#include<iostream>
using namespace std;

long long gcd(long long a,long long b) {
	long long c;
	while(a%b) {
		c=a%b;
		a=b;
		b=c;
	}
	return c;
}

int main() {
	long long n,g,ans;
	cin>>n;
	g=gcd(n,2);
	ans=2*n/g;
	cout<<ans<<endl;
	return 0;
}