BISHOPS  Bishops
Yesterday was Sam's birthday. The most interesting gift was definitely the chessboard. Sam quickly learned the rules of chess and defeated his father, all his friends, his little sister, and now no one wants to play with him any more.
So he decided to play with another birthday gift – a Book of Math Problems for Young Mathematicians. He opened the book somewhere in the middle and read the following problem: "How many knights can be placed on a chessboard without threatening each other?" After a while he realized that this was trivial and moved on to the next problem: "How many bishops can be placed on a chessboard without threatening each other?". Sam is in trouble here. He is not able to solve this problem and needs your help.
Sam's chessboard has size N x N. A bishop can move to any distance in any of the four diagonal directions. A bishop threatens another bishop if it can move to the other bishop's position. Your task is to compute the maximum number of bishops that can be placed on a chessboard in such a way that no two bishops threaten each other.
Input
The input file consists of several lines. The line number i contains a single positive integer N representing the size of the ith chessboard. [1 <= N <= 10^100]
Output
The output file should contain the same number of lines as the input file. The ith line should contain one number – the maximum number of bishops that can be placed on ith chessboard without threatening each other.
Example
Input: 2 3 Output: 2 4
hide comments
Haijun Deng:
20130114 06:09:33
always get NZEC while using following code to read file in Java


Liber(China):
20130114 03:52:10
Extremely easy using Ruby 

viraj:
20121225 10:26:11
@AbhiShek Tiwari can you tell me how you find EOF in java ? 

Abhishek Tiwari:
20121223 09:00:40
was doing a silly mistake.it was easy with java.;) 

Aayush:
20121216 20:37:33
Getting wrong answer ( C++)...no idea why!! all test cases seem to run fine on my pc...


arijit pande:
20121213 10:26:36
Quite simple in python, difficult in C


cenation:
20121209 12:42:39
accepted with bad time........


Debasish:
20121201 06:20:16
using java was useful!! 

Artur Laskowski:
20121128 13:18:46
You have to make your own new type :)


gourav:
20120828 12:29:31
hey.. can anyone tell me how to deal with the n like 10^100 ? it is out of range of any data type in C and it is used in many problems. So please tell how to deal ? 
Added by:  Roman Sol 
Date:  20050417 
Time limit:  1s 
Source limit:  10000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  IPSC 2004 