import java.util.Scanner; public class No378 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long x = 0; while(N != 0) { if(N % 2 == 1) { x++; } N /= 2; } System.out.println(x); } }