#include #include #include //using namespace chrono; #include using namespace atcoder; #define int long long #define double long double #define stoi stoll #define endl "\n" using std::abs; using namespace std; //constexpr int MOD = 1000000007; constexpr int MOD = 998244353; //using mint = modint1000000007; using mint = modint998244353; constexpr double PI = 3.14159265358979323846; const int INF = 1LL << 62; const int dx[8] = { 1, 0, -1, 0 ,1,1,-1,-1}; const int dy[8] = { 0, 1, 0, -1,1,-1,1,-1 }; #define rep(i,n) for(int i=0;i=0;i--) #define Rrep(i,n) for(int i=n;i>0;i--) #define frep(i,n) for(auto &x:n) #define LAST(x) x[x.size()-1] #define ALL(x) (x).begin(),(x).end() #define MAX(x) *max_element(ALL(x)) #define MIN(x) *min_element(ALL(x) #define RUD(a,b) (((a)+(b)-1)/(b)) #define sum1_n(n) ((n)*(n+1)/2) #define SUM1n2(n) (n*(2*n+1)*(n+1))/6 #define SUMkn(k,n) (SUM1n(n)-SUM1n(k-1)) #define SZ(x) ((int)(x).size()) #define PB push_back #define Fi first #define Se second template constexpr auto min(T... a) { return min(initializer_list>{a...}); } template constexpr auto max(T... a) { return max(initializer_list>{a...}); } template void in(T&... a) { (cin >> ... >> a); } template using v = vector; template using vv = vector>; template using vvv = vector>; using pint = pair; using tint = tuple; double LOG(int a, int b) { return log(b) / log(a); } double DISTANCE(int x1, int y1, int x2, int y2) { return sqrt(abs(x1 - x2) * abs(x1 - x2) + abs(y1 - y2) * abs(y1 - y2)); } inline bool BETWEEN(int x, int min, int max) { if (min <= x && x <= max) return true; else return false; } inline bool between(int x, int min, int max) { if (min < x && x < max) return true; else return false; } inline bool BETWEEN2(int i, int j, int H, int W) { if (BETWEEN(i, 0, H - 1) && BETWEEN(j, 0, W - 1)) return true; else return false; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } inline bool bit(int x, int i) { return x >> i & 1; } int ini() { int x; cin >> x; return x; } string ins() { string x; cin >> x; return x; } void yn(bool x) { if (x) { cout << "Yes" << endl; } else { cout << "No" << endl; } } void YN(bool x) { if (x) { cout << "YES" << endl; } else { cout << "NO" << endl; } } int ipow(int x, int n) { int ans = 1; while (n > 0) { if (n & 1) ans *= x; x *= x; n >>= 1; } return ans; } template vector compress(vector& X) { vector vals = X; sort(ALL(vals)); vals.erase(unique(ALL(vals)), vals.end()); rep(i, SZ(X)) X[i] = lower_bound(ALL(vals), X[i]) - vals.begin(); return vals; } vector> run_length(string x) { vector> ans; char ch = x[0]; int cou = 1; REP(i, SZ(x)) { if (x[i] == x[i - 1]) { cou++; } else { ans.push_back({ ch,cou }); ch = x[i]; cou = 1; } } return ans; } void solve() { int a, b; in(a, b); int ans; if ((a + 4) % 12 == b)ans = (a + 8) % 12; else ans = (a + 4) % 12; cout << ans << endl; } signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); solve(); }