#include using namespace std; int main() { int x, y, z; cin >> x >> y; z = (max(x, y)+4)%12; cout << z << endl; }