#include #include #include #include #include int main(void) { long long int renown,normal=0,max,dif,val; scanf("%lld",&renown); max=renown*2; while(1) { normal+=renown; renown/=2; if(renown==1) { normal++; break; } } dif=max-normal; printf("%lld",dif); }