#include using namespace std; #define rep(i, n) for(int i = 0, n_f = (int)(n); i < n_f; ++i) #define rrep(i, n) for(int i = 1, n_f = (int)(n); i <= n_f; ++i) #define rrrep(i, a, n, p) for(int i = (int)(a), n_f = (int)(n), p_f = (int)(p); i <= n_f; i+=p_f) #define repd(i, n) for(int i = (int)(n), n_f = 0; i >= n_f; --i) #define all(a) (a).begin(),(a).end() #define pb(a) push_back(a) #define eb(a) emplace_back(a) #define mpa(a,b) make_pair(a,b) #define YES(a) if(a){cout<<"YES"< vint; typedef vector> vvint; typedef vector vstr; typedef vector vbol; typedef vector> vvbol; typedef vector vdou; typedef vector vll; typedef vector> vvll; typedef vector> vpint; const int dx[] = {-1,0,1,0}; const int dy[] = {0,1,0,-1}; const int mod99 = 998244353; const int mod107 = 1000000007; const ll mod99ll = 998244353LL; const ll mod107ll = 1000000007LL; const int INF = 1000000000; const ll INFll = 1000000000000000000LL; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (bT permu(const T &n,const T &m) {T ret=1;for(T i=n;i>m;--i)ret*=i;return ret;} templateT conbi(const T &n,const T &m) {return permu(n,m)/permu(m,2);} templateT homog(const T &n,const T &m) {return conbi(n+m-1,m);} templateT ppow(T a,T n) {T ret=(T)1;while(n>0){if(n&(T)1)ret=ret*a;a=a*a;n>>=(T)1;}return ret;} templateT mod_pow(T &a,T &n,const T &mod) {T ret=(T)1;while(n>0){if(n&(T)1)ret=ret*a%mod;a=a*a%mod;n>>=(T)1;}return ret;} templateT mod_inv(const T &a,const T &mod) {return modpow(a,mod-(T)2,mod);} template T gcd(T n,T m){if(max(n,m)%min(n,m)==(T)0) return min(n,m);return gcd(min(n,m),(max(n,m)%min(n,m)));} int main(void){ int x,y; cin>>x>>y; if(x>y) swap(x,y); cout<<(y+4)%12<