import java.util.Scanner;

import java.util.Scanner;

public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); int count = 0; while (m>=1){

        if (m%2 == 1){
            count++;
        }
        m/=2;
    }
    System.out.println(count);
}

}