位运算实现

import java.util.Scanner;  
public class Main {  
    public static void main(String[] args) {  
        Scanner in = new Scanner(System.in);  
        int a = in.nextInt();  
        int cnt = 0;  
        while(a!=0){  
            if((a&1)==1){  
               cnt++;   
            } 
            a = a>>>1;  
        }
       System.out.println(cnt);  
    }  
}