#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { ll A, B; cin >> A >> B; ll ans = (A | B) + (A & B); cout << ans << endl; return 0; }