#include<iostream> using namespace std; int shenma(int x) { int y; y=x/2; if(x==1) return 1; else return y+shenma(y); } int main() { int a; cin>>a; cout<<shenma(a)+1; return 0; }