/**
 * @param {number} n
 * @return {number}
 */
var hammingWeight = function(n) {
    let list = n.toString(2).split('').map(Number);
    let sum = 0;
    list.forEach((m)=>{
        if(m == 1){
            sum += 1;a
        }
    })
    return sum;
};
