import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str = null; while((str = in.readLine()) != null){ int num = Integer.parseInt(str); int flag = 1; int i = 0; while(num != 0){ if((num & 1) == 1){ i ++; } num >>>= 1; } System.out.println(i); } } }