#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
#endif

int main()
{
	int64_t a, b;
	cin >> a >> b;

	cout << (a | b) + (a & b) << endl;

	return 0;
}