#include using namespace std; using ll =long long; #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i=a;i=b;i--) int main() { ll A,B;cin>>A>>B; if(A<=B) swap(A,B); if(2*B<=A-B) { cout<