import java.util.; import java.io.; 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 sum = 0; int i = 32; int num = Integer.parseInt(str); while(i -- > 0){ if((num & 1) == 1) sum ++; num >>>= 1; } System.out.println(sum); } } }