#include using namespace std; int n; int main(){ cin>>n; n--; int t=0; while(n){ t+=2-n%2; n/=2; } cout<