#include <stdio.h>

int main() 
{
    int a, b;
    scanf("%d %d",&a,&b);
   int c= a^b;//异或操作符,相同取0,不同取1
   int count=0;
   //c 有几个1就有几个不同位
    while(c)
    {
        c=c&(c-1);
        count++;
    }
    printf("%d",count);
    return 0;
}