import java.util.*; public class Main{ public static void main(String[] arg){ Scanner sc =new Scanner(System.in); int num=sc.nextInt(); StringBuilder sb=new StringBuilder(); for(int i=31;i>=0;i--){ sb.append((num>>>i)&1); } String line=sb.toString(); System.out.println(line.length()-line.replaceAll("1","").length()); } }