import java.util.Scanner; public class TGMain { public static void main(String[] args){ int a, b, c, N; boolean Flg = false; int ans = 0; Scanner sc = new Scanner(System.in); N = sc.nextInt(); while(N != 0){ if(N%2 == 1){ ans += 1; } N /= 2; } System.out.println(ans); } }