#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

const LL INF=-1e18;

LL x,y;

int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    cin>>x>>y;

    int sum=0;

    while(x||y){//只要还有剩余就一直比下去

        if(x%2!=y%2){

            sum++;//如果位不同++

        }

        x>>=1;

        y>>=1;//依次向右移动去比较

        //x>>=1;

    }

    cout<<sum;

    return 0;

}