#include using namespace std; int main() { long long int n, n1, n2; cin >> n; n1 = n * 2; while(n!=0) n2 += n / 2; cout << n1-n2 << endl; }