#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int m, n;
cin >> m >> n;
int x = m ^ n;
int cnt = 0;
while (x > 0){
cnt += x & 1;
x >>= 1;
}
cout << cnt << endl;
return 0;
}

京公网安备 11010502036488号