//输入例子 :
//1999 2299
//输出例子 : 7
#include<stdio.h>
//法一:
int main()
{
    //3,5
    //00000000000000000000000000000011
    //00000000000000000000000000000101
    int a = 0;
    int b = 0;
    int i = 0;
    int count = 0;
    scanf("%d %d", &a, &b);
    for (i = 0; i <= 31; i++)
    {
        if ((a % 2) != (b % 2))
        {
            count++;
        }
        a = a / 2;
        b = b / 2;
    }
    printf("%d", count);
    return 0;
}

//法2:按位与1
int main()
{
	int a = 0;
	int b = 0;
	int count = 0;
	int i = 0;
	scanf("%d %d", &a, &b);
	for (i = 0; i <= 31; i++)
	{
		if (((a >> i) & 1) != ((b >> i) & 1))
		{
			count++;
		}
	}
	printf("%d", count);
}

//法3:按位异或:相同为0,不同为1
int main()
{
	int a = 0;
	int b = 0;
	int count = 0;
	scanf("%d %d", &a, &b);
	int tmp = a ^ b;
	//比如:异或之后结果为1111
	//1111
	//1110//count=1
	//1110
	//1101//count=2
	//1100
	//1011//count=3
	//1000
	//0111//count=4
	//0000
	while (tmp)
	{
		tmp=tmp& (tmp - 1);
		count++;
	}
	printf("%d", count);
	return 0;
}