#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ int X, Y; cin >> X >> Y; for (int Z=0; Z<=11; Z++){ vector a = {X, Y, Z}; sort(a.begin(), a.end()); if (min(12-abs(a[1]-a[0]), abs(a[1]-a[0])) != 4) continue; if (min(12-abs(a[2]-a[1]), abs(a[2]-a[1])) != 4) continue; if (min(12-abs(a[2]-a[0]), abs(a[2]-a[0])) != 4) continue; cout << Z << endl; } return 0; }