#include int main() { int a, b; std::cin >> a >> b; std::cout << (a + b == 2 ? 3 : 2) << std::endl; return 0; }