#include using namespace std; #define rep(i,n) for(int i=0;i=0;--i) #define debug(output) if(debugFlag)cout<<#output<<"= "< P; const bool debugFlag=true; const lint linf=1.1e18;const int inf=1.01e9; constexpr int MOD=1000000007; templatebool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; } templatebool chmin(T &a, const T &b) { if(a > b){ a = b; return 1; } return 0; } signed main(){ int x,y;cin>>x>>y; if(x>y)swap(x,y); if(y-x==4){ cout<<(y+4)%12<<"\n"; } else cout<<(x+y)/2<<"\n"; return 0; }