#include<bits/stdc++.h>

using namespace std;
#define int long long
#define x first
#define y second
#define space ' '
#define endl '\n'
#define pb push_back
#define all(x) x.begin(),x.end()

#define debug(x) x<<' '
typedef pair<int,int> PII;

const int N=2e5+10;
const int INF=0x3f3f3f3f3f3f3f3fLL;
const int inf=0x3f3f3f3f3f3f3f3fLL;
const int mod=1e9+7;
const int MOD=998244353;

int n,m,k,q;

void solve(){
cin>>n>>m;
 vector<int> a,b;
 while(n){
    a.pb(n%2);
    n/=2;
 }
 while(m){
    b.pb(m%2);
    m/=2;
 }
 if(a.size()>b.size()){
    while(b.size()!=a.size()) b.pb(0);
 }
 if(b.size()>a.size()){
    while(a.size()!=b.size()) a.pb(0);
 }
 for(int i=0;i<a.size();i++)
{
    if(a[i]!=b[i]) k++;
}
cout<<k;
}

signed main(){
    // double start=(double)clock()/CLOCKS_PER_SEC;
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(3);
    int t=1;
    // cin>>t;
    while(t--){
        solve();
    }
    // double end=(double)clock()/CLOCKS_PER_SEC;
    // cout<<endl<<"time="<<end-start<<endl;
    return 0;
}