用迭代的方式模拟十进制与二进制的运算过程

from sys import stdin 
oint = int(stdin.readline().strip())
def dealf(x):
    if x == 1:
        return 1
    else :
        if x%2 == 0 :
            asc = dealf(x/2)
            return asc
        else :
            asc = dealf(x//2)
            return asc + 1
print(dealf(oint))