N = int(raw_input()) nr=0 while (N!=0): nr=nr+(N&1) N=N>>1 print nr