#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;
}