#include using namespace std; #define REP(i,n) for(int i=0;i=0;i--) #define EPS (1e-7) typedef long long ll; typedef pair pii; typedef pair pll; typedef pair pdd; int vx[]={0,0,-1,1}; int vy[]={1,-1,0,0}; int dx[]={1,0,-1,1,-1,1,0,-1}; int dy[]={1,1,1,0,0,-1,-1,-1}; const ll mod=1e9+7; const int INF=INT_MAX/2; const int MAX=1e9; int main(){ int n; cin>>n; int k=0; while(n%2==0){ k++; n/=2; } int s=0,i=1; while(i