n, m = map(int,input().split())
s = 0
while n > 0 or m > 0:
    if n % 2 != m % 2:
        s += 1
    n //= 2
    m //= 2
print(s)