import java.util.*;
public class Main{
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()){ int num = Integer.parseInt(scanner.nextLine()); int d = Integer.bitCount(num); System.out.println(d); } }
}