#include <bits/stdc++.h>
#define FastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false))
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

void solve() {
  int a, b;
  cin >> a >> b;

  cout << (a | b) + (a & b) << '\n';
}

int main() {
  FastIO;
  solve();
  return 0;
}