import java.util.Scanner;

/**
 * 【求int型正整数在内存中存储时1的个数】
 *
 *  描述:输入一个 int 型的正整数,计算出该 int 型数据在内存中存储时 1 的个数。
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int nextInt = sc.nextInt();

        int count = 0;
        while (nextInt > 0) {
            int flag = nextInt % 2;
            if (flag == 1) {
                count++;
            }
          	//  右移一位
            nextInt = nextInt >> 1;
        }
        System.out.println(count);
    }
}