#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
cout << ((n % 2 == 0) || (n == 1)? n/2 : n);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgY291dCA8PCAoKG4gJSAyID09IDApIHx8IChuID09IDEpPyBuLzIgOiBuKTsgCiAgICByZXR1cm4gMDsKfQ==