Problem:
 Score: 100 points    Problem Statement  In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year. For example, May 3 , 2018 is written as 2018 - 5 - 3 , or 5 - 3 without the year.  In this country, a date is called Takahashi when the month and the day are equal as numbers. For example, 5 - 5 is Takahashi. How many days from 2018 - 1 - 1 through 2018 - a - b are Takahashi?      Constraints   a is an integer between 1 and 12 (inclusive).  b is an integer between 1 and 31 (inclusive).  2018 - a - b is a valid date in Gregorian calendar.         Input  Input is given from Standard Input in the following format:  a  b       Output  Print the number of days from 2018 - 1 - 1 through 2018 - a - b that are Takahashi.        Sample Input 1 5 5      Sample Output 1 5  There are five days that are Takahashi: 1 - 1 , 2 - 2 , 3 - 3 , 4 - 4 and 5 - 5 .       Sample Input 2 2 1      Sample Output 2 1  There is only one day that is Takahashi: 1 - 1 .       Sample Input 3 11 30      Sample Output 3 11  There are eleven days that are Takahashi: 1 - 1 , 2 - 2 , 3 - 3 , 4 - 4 , 5 - 5 , 6 - 6 , 7 - 7 , 8 - 8 , 9 - 9 , 10 - 10 and 11 - 11 .

Solution (Python):
a, b = map(int, input().split())
if a > b:
  print(a - 1)
else:
  print(a)

Solution (Python):
a,b=[int(i) for i in input().split()]
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int,input().split())
if(a <= b):
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
elif a > b :
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a, b =  map(int,input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):

import sys



def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    if A <= B:
        print(A)
    else:
        print(A-1)



lines = [x.strip() for x in sys.stdin.readlines()]

 

solve(lines)

Solution (Python):
a,b=map(int,input().split())
print(a-(a>b))

Solution (Python):
a,b = map(int,input().split())

count = 0
count += a-1
if b >= a:
    count +=1

print(count)

Solution (Python):
a, b = map(int, input().split())
ans = a
if a > b:
    ans -= 1
print(ans)

Solution (Python):
a, b =  map(int,input().split())
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int,input().split())

if(a <= b):
  print(a)
else:
  print(a - 1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b=map(int, input().split())
if a>b:
  flag=1
else:
  flag=0
print(a-flag)

Solution (Python):
a,b = map(int,input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
def main():
    a, b = map(int, input().split())
    if a > b:
        print(a - 1)
    else:
        print(a)


main()

Solution (Python):
a,b=map(int,input().split())
print(a-(a>b))

Solution (Python):
a, b = map(int, input().split())
print(a if a <= b else a - 1)

Solution (Python):
a, b = map(int, input().split())
print(a - (0 if a <= b else 1))

Solution (Python):
a, b = [int(n) for n in input().split()]

if a > b:
    print(a - 1)
else:
    print(a)

Solution (Python):
A,B=map(int,input().split())
if(A<=B):
  print(A)
else:
  print(A-1)

Solution (Python):
a,b = map(int,input().split())
print(a if a <= b else a - 1)

Solution (Python):
a,b = map(int,input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a,b = map(int, input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
"""AtCoder"""

a, b = map(int, input().split())

if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
A,B = map(int,input().split())
print(A if A<=B else A-1)

Solution (Python):
a,b=map(int,input().split())
print(a if (a<=b) else a-1)

Solution (Python):
a,b = map(int,  input().split())
if b >= a:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,input().split())

if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = map(int, input().split())
print(a - 1 + (a <= b))

Solution (Python):
a,b=map(int,input().split())
print((a-1)+(b>=a))

Solution (Python):
a, b = map(int, input().split())

if a > b:
    print(a - 1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())
if a > b : print(a-1)
else: print(a)

Solution (Python):
a,b = map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):


def main():
    na = list(map(int, input().split()))
    a, b = na[0], na[1]

    print(a if a <= b else a - 1)


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
if a > b: print(a-1)
else: print(a)

Solution (Python):
ab=[int(i) for i in input().split()]
print(ab[0] if ab[1]>=ab[0] else ab[0]-1)

Solution (Python):
a, b = map(int, str(input()).split(" "))
print(a - 1 + (1 if a <= b else 0))

Solution (Python):
def main(a,b):
    return (a-1+(a<=b))
a,b=map(int,input().split())
print(main(a,b))

Solution (Python):
a,b = map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a <= b:
    print(a)
else:print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())

if a > b :
	print(a - 1)
else:
	print(a)

Solution (Python):
a, b = map(int,input().split())
if(a <= b):
  print(a)
elif(a > b):
  print(a-1)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b=map(int,input().split())
if a>b:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = [int(x) for x in input().split()]

ans = a
if b < a:
    ans -= 1

print(ans)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a, b = map(int, input().split())
count = a-1
if a <= b:
    count += 1
print(count)

Solution (Python):
a, b = map(int, input().split())
if a > b:
	print(a - 1)
else:
	print(a)

Solution (Python):
a,b=map(int,input().split())
print(a-1 if a>b else a)

Solution (Python):
a,b=map(int,input().split())

print(a if a<=b else a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = list(map(int,input().split()))

if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split());print([a-1,a][b>=a])

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
M,D=map(int,input().split())
if M<=D:
    print(M)
else:
    print(M-1)

Solution (Python):
a, b = map(int, input().split())

if(a>b):
    print(a-1)
else:
    print(a)

Solution (Python):
x,y = map(int,input().split())	
print([x,x-1][y < x])

Solution (Python):
a, b = map(int, input().split())
ans = a
if a > b:
    ans -= 1
print(ans)

Solution (Python):
a,b = map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
def main():
    a, b = map(int, input().split())
    print(a - 1 + int(b >= a))


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
ans = a
if a > b:
    ans -= 1
print(ans)

Solution (Python):
x,y = map(int,input().split())	
print([x,x-1][y < x])

Solution (Python):
x,y = map(int,input().split())	
print([x,x-1][y < x])

Solution (Python):
a,b = [int(i) for i in input().split()]

if (a > b) :
	print(a-1)
else :
	print(a)

Solution (Python):
a, b = map(int, input().split())
result = a
if a > b:
    result -= 1
print(result)

Solution (Python):
a,b = map(int,input().split())
print(a-1+(a<=b))

Solution (Python):
a,b=map(int,input().split())
tak=[]

if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):



def main():
    """Function."""
    a, b = map(int, input().split())
    if b >= a:
        print(a)
    else:
        print(a-1)


if __name__ == "__main__":
    main()

Solution (Python):

a,b = map(int,input().split())
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
  print(a)
else:
  print(a - 1)

Solution (Python):
a, b = map(int, input().split())
cnt = a - 1
if b >= a:
    cnt += 1
print(cnt)

Solution (Python):
a,b = map(int,input().split(" "))
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b =  map(int,input().split())
if a>b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int,input().split())

print( a  if a<=b else a-1 );

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a - 1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split(" "))
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):

print((lambda x: x[0] if x[0] <= x[1] else x[0]-1)(tuple(map(int, input().split()))))

Solution (Python):
a,b = map(int, input().split())

if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())
if b < a:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int, input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())

if a<=b:
    print(a)
elif a==1:
    print(1)
else:
    print(a-1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=(int(i) for i in input().split())
if a<=b:print(a)
else:print(a-1)

Solution (Python):
a,b=(int(i) for i in input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b=(int(i) for i in input().split())
if a<=b:
  print(a)   
else:
  print(a-1)

Solution (Python):
a, b = map( int, input().split())

if( b < a):
  count = a - 1
    
else:
  count = a
    
print(count)

Solution (Python):
A, B = [int(_) for _ in input().split()]

result = A - (A > B)

print(result)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
def main():
    a,b = map(int, input().strip().split())
    if b < a:
        print(a-1)
    else:
        print(a)

if __name__ == "__main__":
    main()

Solution (Python):
a,b=map(int,input().split());print(a-(a>b))

Solution (Python):
a,b=map(int,input().split());print(a-(a>b))

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b = list(map(int, input().split()))
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
print(a if a <= b else a-1)

Solution (Python):
a=input().strip().split(" ")
b=[int(i) for i in a]

c=b[0]-1

if(b[1]>=b[0]):
    print(c+1)
else:
    print(c)

Solution (Python):
a,b = map(int,input().split())

if a>b:
  print(a-1)
else:
  print(a)

Solution (Python):
a,b=map(int,input().split());print(a-1+(a<=b))

Solution (Python):
a, b = map(int, input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = list(map(int, input().split()))
print(a if b >= a else a - 1)

Solution (Python):
a,b = map(int,input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b=map(int,input().split())
if(a<=b):
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = list(map(int, input().split()))


if a/b == 1:
  print(a)
elif a/b < 1:
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
N = list(map(int, input().split()))
if N[0] <= N[1]:
    print(N[0])
else :
    print(N[0]-1)

Solution (Python):
a = list(map(int,input().split()))
if a[0] <= a[1]:
  print(a[0])
else:
  print(a[0]-1)

Solution (Python):
a, b = [int(i) for i in input().split()]
print(a) if b>=a else print(a-1)

Solution (Python):
a,b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):

a, b = map(int, input().split())
count = 0
for i in range(1,a + 1):
    if i < a:
        for j in range(1,31):
            if i == j:
                count += 1
    if i == a:
        for j in range(1,b + 1):
            if i == j:
                count += 1

print(count)

Solution (Python):
a, b = map(int, input().split())

if(b >= a):
    print(a)
else:
    print(a-1)

Solution (Python):
def run(a, b):
    if a <= b:
        return a
    else:
        return a - 1

def main():
    a, b, = map(int, input().split())
    print(run(a, b))


if __name__ == '__main__':
    main()

Solution (Python):
y, m = map(int, input().split())
print(y - 1 + (1 if y <= m else 0))

Solution (Python):
a, b = map(int,input().split())
if a > b:
	print(a-1)
else:
	print(a)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b=(int(i) for i in input().split(' '))
print(a if a<=b else a-1)

Solution (Python):
a, b = list(map(int, input().split()))
ans = a - 1
if a <= b:
    ans += 1

print(ans)

Solution (Python):
a, b = map(int, raw_input().split())
if a <= b:
	print a
else:
	print a - 1

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = [int(_) for _ in input().split()]
print(a - 1 if a > b else a)

Solution (Python):
a,b = map(int,input().split())
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = list(map(int, input().split()))

if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map (int,input ().split ())
print (a if a<=b else a-1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else(a-1))

Solution (Python):
m,d = map(int,input().split())
if m > d:
    print(m-1)
else:
    print(m)

Solution (Python):
month, day = map(int, input().split())
dayOfTakahashi = month if month<=day else month -1
print(dayOfTakahashi)

Solution (Python):
a, b = [int(i) for i in input().split()]
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int,input().split())

if a <= b:
    print(a)
else:
    print((a - 1))

Solution (Python):
a,b=map(int,input().split())
if a<=b:
	print(a)
else:
	print(a-1)

Solution (Python):


a,b  = map(int, input().split())

if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a, b = [int(m) for m in input().split(" ")]

print(a-1 + bool(b//a))

Solution (Python):
a, b = list(map(int, input().split()))

ans = a if b >= a else a-1

print(ans)

Solution (Python):
a, b = map(int, input().split())

print(a if a <= b else a-1)

Solution (Python):

m, d = map(int, input().split())
print([m-1, m][d >= m])

Solution (Python):
a,b=map(int,input().split())
for i in range(a):
    i+=1
    if a>b:
        i-=1
print(i)

Solution (Python):
a,b=map(int,input().split())


if a > b:
	print(a-1)
else:
	print(a)

Solution (Python):
a,b = [int(i) for i in input().split()]

ans = a

if a > b:
    ans -= 1

print(ans)

Solution (Python):
a,b = map(int, input().split())

if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())

if a < b+1:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b =map(int,input().split())

if a<b+1:
     print (a)
else:
     print (a-1)

Solution (Python):
a,b=map(int,input().split())
if b<a:
    print(a-1)
else:
    print(a)

Solution (Python):
a,b = map(int,input().split())
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int, input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b = map(int,input().split())
if b // a == 0:
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)

else:
    print(a - 1)

Solution (Python):
from sys import stdin

a, b = [int(i) for i in stdin.readline().rstrip().split()]

if b >= a:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b = map(int,input().split());print([a,a-1][a>b])

Solution (Python):
a,b = map(int, input().split())
if b >= a:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())

if a>b :
    print(a-1)
else :
    print(a)

Solution (Python):
a,b = map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b=list(map(int,input().split()))
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())

if b >= a:
  print(a)
else:
  print(a - 1)

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a - 1)
else:
    print(a)

Solution (Python):
a,b = map(int,input().split())
if (a <= b):
  print(a)
else:
  print(a-1)

Solution (Python):
a, b = map(int, raw_input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = list(map(int, input().split()))

result = a if b >= a else a-1
print(result)

Solution (Python):
a,b=map(int,input().split())
print(a-(a>b))

Solution (Python):
a,b = map(int,input().split())
print(a + min(1,b//a) -1)

Solution (Python):
a,b=map(int,input().split())
print(a-(a>b))

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b=map(int,input().split())
if a>b:print(a-1)
else:print(a)

Solution (Python):
a,b=map(int,input().split( ))
if a>b:
  print(a-1)
else:
  print(a)

Solution (Python):
a,b=map(int,input().split());print(a-(a>b))

Solution (Python):
a, b = map(int, input().split())
if a <= b :
    print(a)
else:
    print(a-1)

Solution (Python):
a,b=map(int,input().split())
if a > b:
  print(a-1)
else:
  print(a)

Solution (Python):
a,b=map(int,input().split())
if b>=a:
    print(a)
else:
    print(a-1)

Solution (Python):
 

def main():
    a, b = map(int, input().split())
    print(a-1 if a > b else a)

if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
ans = a-1
if b >= a:
    ans += 1
print(ans)

Solution (Python):
a, b = map(int, input().split())
ans = a-1
if b >= a:
    ans += 1
print(ans)

Solution (Python):
a, b = map(int, raw_input().split())
ans = a
if b < a: ans = ans - 1
print ans

Solution (Python):
a, b = map(int, input().split())

if b < a:
    print(a-1)
else:
    print(a)

Solution (Python):
a,b = (int(_) for _ in input().split())
print(a-1) if a > b else print(a)

Solution (Python):
a,b=map(int,input().split())
print([a,a-1][a>b])

Solution (Python):
a, b = map(int, input().split())

print(a - (a > b))

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):

a,b=map(int,input().split())
if a>b:
    print(a-1)
else:
    print(a)

Solution (Python):
a,b = map(int,input().split())
if a<=b:
  print(a)
else :
  print(a-1)

Solution (Python):
a, b = map(int, input().split())
print(a if a <= b else a - 1)

Solution (Python):
a, b = map(int, input().split())
print(a if a <= b else a - 1)

Solution (Python):
a,b = map(int,input().split())
Taka=a-1
if(a>b):
  Taka=a-1
else:
  Taka = Taka + 1
print(Taka)

Solution (Python):
a,b=(int(i) for i in input().split())

if a <= b :
  	print(a)
else :
	print(a-1)

Solution (Python):
a, b = map(int, input().split())
 
if(b<a):
  print(a-1)
else:
  print(a)

Solution (Python):
a, b = map(int, input().split())

if(b<a):
  print(a-1)
else:
  print(a)

Solution (Python):
a,b = map(int,input().split())
if a > b :
    print(a-1)
else :
    print(a)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if(b >= a):
    print(a)
else:
    print(a - 1)

Solution (Python):
a, b = map(int, input().split())
if b >= a:
  print(a)
else:
  print(a - 1)

Solution (Python):
a, b = list(map(int, input().split()))
print(a if a<=b else a-1)

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    a, b = map(int, input().split())
    ans = 0
    for m in range(1, a + 1):
        for d in range(1, b + 1 if m == a else 32):
            ans += (m == d)
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int, input().split())

print(a - (a > b))

Solution (Python):
a, b = map(int, input().split())

if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a,b =map(int, input().split())

if b >=a:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())

if a > b:
    print(a - 1)
else:
    print(a)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]



dp = None

def main():
    a, b = map(int, input().split())

    if a <= b:
        print(a)
    else:
        print(a-1)

main()

Solution (Python):
x,y=map(int,input().split())
if x<=y:
	print(x)
else:
	print(x-1)

Solution (Python):
a,b = map(int,input().split())
print(a-1 if b < a else a)

Solution (Python):
a,b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    if a==1:
        print(a)
    else:
        print(a-1)

Solution (Python):
a,b = map(int,input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b = map(int,input().split())
if a > b :
    print(max(1,a-1))
else :
    print(a)

Solution (Python):
a,b = map(int,input().split())
print(a + (b>=a) - 1)

Solution (Python):
m,d = map(int, input().split())
if (m <= d):
    print(m)
else:
    print(m-1)

Solution (Python):
a, b = map(int, input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = [int(m) for m in input().split(" ")]

print(a-1 + bool(b//a))

Solution (Python):
a,b=map(int,input().split())
if a<=b:print(a)
else:print(a-1)

Solution (Python):
A, B = [int(x) for x in input().split()]
ans = A + (0 if A <= B else -1)
print(ans)

Solution (Python):

a, b = map(int, input().split())

if (a <= b):
  print(a)
else:
  print(a-1)

Solution (Python):
a, b =map(int, input().split())
if b >= a: ans = a
else: ans = a-1
print(ans)

Solution (Python):
a, b = map(int, input().split())

res = a - 1 
if a > b:
    pass
else:
    res += 1
print(res)

Solution (Python):
a,b=map(int,input().split())
print(a+int(b>=a)-1)

Solution (Python):
a,b = [int(x) for x in input().split()]
 
if b >= a:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,input().split())

if a >b:
    takahashi = a-1
else:
    takahashi =a
print(takahashi)

Solution (Python):
A,B=map(int,input().split())
print(A-1 if A>B else A)

Solution (Python):
a, b = (int(x) for x in raw_input().split())
if a > b:
	print a-1
else:
	print a

Solution (Python):
a, b = list(map(int, input().split()))
print(a if a <= b else a-1)

Solution (Python):


def main():
    a, b = list(map(int, input().split()))

    if b < a:
        print(a - 1)
    else:
        print(a)

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
print(a-(b<a))

Solution (Python):
a,b = map (int,input().split())
print( a if b >= a else a-1)

Solution (Python):
a,b = map(int,input().split())
ans = a
if b < a:
    ans -= 1
print(ans)

Solution (Python):
a, b = list(map(int, input().split()))
if a <= b:
	print(a)
else:
	print(a - 1)

Solution (Python):
x,y = map(int,input().split())	

if x <= y:
  print(x)
else:
  print(x-1)

Solution (Python):
a,b = map (int , input().split())

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b :
    print(a)
else:
    print(a -1)

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
x=input().split()
a=int(x[0])
b=int(x[1])
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = list(map(int,input().split()))
count = 0
for i in range(1,a+1):
    for j in range(30):
        if i == j:
            count = count +  1
if (b < a):
    count = count -1
print(count)

Solution (Python):
x = list(map(int, input().split()))

if x[0] > x[1]:
	print(x[0]-1)
else:
	print(x[0])

Solution (Python):

a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b=list(map(int, input().split()))
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())

if a>b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split(' '))

if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int,input().split(" "))
num = a
if a > b:
    num -= 1
print(num)

Solution (Python):
a, b = map(int, input().split())
sol = 0
for i in range(1, a+1):
    if i == a:
        if b >= a:
            sol += 1
    else:
        sol += 1
print(sol)

Solution (Python):
if __name__ == '__main__':
    a, b = map(int, input().split(' '))
    if b >= a:
        print(a)
    else:
        print(a-1)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a - 1)

Solution (Python):
a, b = [int(i) for i in input().split()]

c = a-1
if a <= b:
    c += 1

print(c)

Solution (Python):
a,b = [int(i) for i in input().split()]

ans = a
if a>b:
  ans -= 1

print(ans)

Solution (Python):
a,b = map(int, input().split())

if b >= a:
	print (a)
else:
	print (a-1)

Solution (Python):
a, b = map(int, input().split())
if a > b:
  print(a - 1)
else:
	print(a)

Solution (Python):
[a,b]=[int(i) for i in input().split()]
if a<=b:
    print(a)
else:
    print(a-1)

Solution (Python):
goop=input().split()
if int(goop[0])<=int(goop[1]):
    print(int(goop[0]))
else:
    print(int(goop[0])-1)

Solution (Python):
a, b = map(int, input().split())

count=0
if a <= b:
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
print(a-1+(1 if a <= b else 0))

Solution (Python):
a,b=map(int,input().split());print(a-int(a>b))

Solution (Python):
a,b=map(int,input().split());t=int(a>b);print(a-t)

Solution (Python):
A,B = input().split()
a = int(A)
b = int(B)
count = 0

if(a<=b):
	print(a)
else:
	print(a-1)

Solution (Python):
a,b=map(int,input().split())
if b-a>=0:
	print(a)
else:
	print(a-1)

Solution (Python):
a,b= map(int,input().split())

if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b= map(int,input().split())

if a<=b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
day = list(map(int,input().split(" ")))

takahashi = day[0]

if takahashi > day[1]:
	takahashi -= 1

print(takahashi)

Solution (Python):
a,b=map(int,input().split())
if b<a:
    print(a-1)
else:
    print(a)

Solution (Python):
x, y = map(int, input().split())
 
cnt = 0
for i in range(1, 13):
    if i > x:
        break
    for j in range(1, 13):
        if i == j:
            cnt += 1
        if i == x and j == y:
            break
print(cnt)

Solution (Python):
a,b = map(int,input().split())

if a <= b :
	print(a)
    
else :
	print(a-1)

Solution (Python):
x, y = map(int, input().split())

if x <= y:
  print(x)
else:
  print(x-1)

Solution (Python):
a,b=map(int,input().split())
print(a if a<=b else a-1)

Solution (Python):
a,b=map(int,input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b=map(int,input().split())
if b>=a:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,raw_input().split())

if a <= b:
  print a
else :
  print a-1

Solution (Python):
a,b=map(int,input().split())
if b>=a:
  print(a)
else:
  print(a-1)

Solution (Python):



"""
@param {int}
@return {int}
"""
def calcTakahashi(a,b):

    if( a <= b):
        return a
    else:
        return (a-1)

    
    
    
    
    
    
    

if __name__ == '__main__':

    a,b = map(int,input().split())

    print(calcTakahashi(a,b))

Solution (Python):
x,y=[int(x) for x in str(input()).split()]
if x>y:
  print(x-1)
else:
  print(x)

Solution (Python):
a,b = map(int, input().split())
if b<a:
    print(a-1)
else:
    print(a)

Solution (Python):
l = list(map(int, input().split()))
a, b = [i for i in l]

ans_count = 0
for mon in range(1, a + 1):
    max_day = 31
    if mon == a:
        max_day = b

    for day in range(1, max_day + 1):
        if day == mon:
            ans_count += 1

print(ans_count)

Solution (Python):
a, b = map(int, input().split())

if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())
print(a-(a>b))

Solution (Python):
a, b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Solution (Python):
a, b = map(int, input().split())
if a <= b:
  print(a)
else:
  print(a-1)

Solution (Python):
a,b = map(int,input().split())
if(a <= b):
    print(a)
else:
    print(a-1)

Solution (Python):
a,b = map(int,input().split())
if a<=b:
  print(a)
else:
  print (a-1)

Solution (Python):
N=map(int,raw_input().split())
if N[0]<=N[1]:
    print N[0]
else:
    print N[0]-1

Solution (Python):
x = [int(i) for i in input().split(" ")]
if x[0] <= x[1] :
    print(x[0])
else:
    print(x[0]-1)

Solution (Python):
data = input().split()
a = int(data[0])
b = int(data[1])
ans = 0
ans = a - 1
if b >= a:
	ans += 1
print(ans)

Solution (Python):
a, b = map(int, input().split())
if b >= a:
  	print(a)
else:
	print(a-1)

Solution (Python):
a,b = map(int,input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):

a, b = map(int, input().split())

if b >= a:
    print(a)
else:
    print(a - 1)

Solution (Python):
a,b=map(int,input().split())
t=a*100+b
for x in range(12,0,-1):
    if t >= x*101:print(x);break

Solution (Python):
a, b = map(int, input().split())

if b >= a:
    print(a)
else:
    print(a-1)

Solution (Python):
a, b = map(int, input().split())

if a > b:
    a -= 1

print(a)

Solution (Python):
a,b = map(int,input().split())

if b>=a:
  print(a)
else:
  print(a-1)