//#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
using namespace std;

long long n,ans;
int main()
{
     while(cin >> n)
     {
//          cout << __gcd(n,(long long)2) << endl;
        if(__gcd((long long)2 ,n) == 1)
          cout << (long long)2 * n << endl;
        else {
             cout << n << endl;

        }
     }
     return 0;
}
