import java.util.*; public class Main { public static void main(String args[]) { Scanner input = new Scanner(System.in); while(input.hasNext()){ int in = input.nextInt(); int count=0; while(in!=0){ if(in%2==1) count++; in=in>>1; } System.out.println(count); } } }