int main()
{
	int n = 0;
	int m = 0;
	int x = 0;
	int y = 0;
	int count = 0;
	scanf("%d %d",&n,&m);
	for (int i = 0; i < 32; i++)
	{
		x = n % 2;
		n = n / 2;
		y = m % 2;
		m = m / 2;
		if (x != y)
		{
			count++;
		}
	}
	printf("%d",count);


	return 0;
}