program main implicit none integer*8::n,i,j,k,ans=0 read*,n i=n j=1 do while(j0) if(mod(i,2)==1)ans=ans+1 i=i/2 end do print*,ans end program