import java.util.*; import java.lang.*; import java.io.*; import java.math.BigInteger; class Main { public static void main (String[] args) throws java.lang.Exception { Scanner scan = new Scanner(System.in); String str = scan.next(); // your code goes here BigInteger n = new BigInteger(str); System.out.println(n.bitCount()); } }