m,n=map(int,input().split())
x=m^n
c=0
while x>0:
    if x%2==1:
        c+=1
    x>>=1
print(c)