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 number N representing the size of the i-th chessboard. [N <= 10^100]

Output

The output file should contain the same number of lines as the input file. The i-th line should contain one number – the maximum number of bishops that can be placed on i-th chessboard without threatening each other.

Example

Input:
2
3

Output:
2
4


#include <iostream>
#include <string>
#include <vector>

using namespace std;

int mod(int a, int b) {  
    return (a % b < 0 ? a % b + b : a % b);
}

void vectorMultiplication(vector<int> &N, int n) {  
    int carry = 0;
    for (int i = 0; i < N.size(); ++i) {
        N[i] *= n;
        N[i] += carry;
        carry = N[i] / 10;
        N[i] %= 10;
    }
    return;
}

void vectorSubstraction(vector<int> &N, int n) {  
    N[0] -= n;
    for (int i = 0; i < N.size() - 1; ++i) {
        if (N[i] < 0) {
            N[i] = mod(N[i], 10);
            --N[i + 1];
        }
    }
    return;
}

string bishops(string S) {  
    vector<int> N(102,0);
    for (int i = 0; i < S.size(); ++i) {
        N[i] = S[S.size() - 1 - i] - '0';
    }
    vectorMultiplication(N, 2);
    vectorSubstraction(N, 2);
    string ans = "";
    bool flag = false;
    for (int i = 101; i >= 0; --i) {
        if (!flag && N[i] == 0){
            continue;
        } else {
            flag = true;
            ans += char(N[i] + '0');
        }
    }
    return ans;
}

int main() {  
    string S;
    while(cin >> S) {
        if (S == "0" || S == "1") {
            cout << S << "\n";
        } else {
            cout << bishops(S) << "\n";
        }
    }
    return 0;
}