A,B=map(int,input().split()) if A>2*B or 2*A