#include using namespace std; int main(){ int X, Y; cin >> X >> Y; cout << (max(X, Y) + 4) % 12; }