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):
month, day = [int(i) for i in input().split()]
dayOfTakahashi = month if month <= day else month - 1
print(dayOfTakahashi)

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

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

a = l[0]
b = l[1]

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

Solution (Python):
month, day = map( int, input().split() )
ans = 0

if month <= day :
    ans = month
else :
    ans = month - 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())
z = a-1
takahsashi = z+1
if(a>b):
	takahsashi = z
print(takahsashi)

Solution (Python):
X = input().split(" ")

a = int(X[0])
b = int(X[1])

if a < 1 and 12 < a:
    exit()
elif b < 1 and 31 < b:
    exit()

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

Solution (Python):
import sys

def readQuestion():
    line = sys.stdin.readline()
    sline = line.rstrip()
    [sa,sb] = sline.split()
    a = int(sa)
    b = int(sb)
    return(a,b)

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

def main():
    a,b = readQuestion()
    answer = solve(a,b)
    print(answer)
    
    
if __name__ == '__main__':
    main()

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

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

Solution (Python):
num = list(map(int,input().split()))
a = num[0]
b = num[1]

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

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

print(takahashi)

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

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

Solution (Python):
x, y = map(int, input().split())
ans = x - 1
if x <= y: 
    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 = map(int, input().split())
if a <= b:
    print(a)
else:
    print(a-1)

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

print(s)

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

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

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

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

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

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

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

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()]
day = 0

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

print(day)

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

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

Solution (Python):
mohu=input().split()
mohu1=list(map(int,mohu))
a=mohu1[0]
b=mohu1[1]
if b>12:
    ans=a
else:
    if a>b:
        ans=a-1
    else:
        ans=a
print(ans)

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

print(a-1 + int(b >= a))

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

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

Solution (Python):


instr = raw_input().split()
if instr[0] <= instr[1]:
    answer = instr[0]
else :
    answer = int(instr[0]) - 1
print(answer)

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 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())
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=[int(i) for i in input().split()]
b=a[0]
c=a[1]

if b>c:
	print(b-1)

else:
	print(b)

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

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

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

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

Solution (Python):
a,b = list(map(int,input().split()))
cnt = 0
for m in range(1,a+1):
    if m == a:
        last = b
    else:
        last = 31
    for d in range(1,last+1):
        if m == d :
            cnt += 1
            

print(cnt)

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

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

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(' ')]
ans = a - 1
ans += 1 if b >= a else 0
print(ans)

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

ans = 0
for month in range(1, a + 1):
    if month == a:
        last_day = b
    elif month in [1, 3, 5, 7, 8, 10, 12]:
        last_day = 31
    elif month in [4, 6, 9, 11]:
        last_day = 30
    elif month == 2:
        last_day = 28
    for day in range(1, last_day + 1):
        if month == day:
            ans += 1
print(ans)

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

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

print(ans)

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

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

Solution (Python):
smonth, sday = 1,1
m,d = map(int,input().split())
total = 0

for i,j in zip(range(12),range(12)):
    if(smonth+i < m):
        total += 1
    elif(smonth+i == m):
        if(sday+i > d):
            break
        else:
            total +=1
            break
    else:
        break
print(total)

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

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:
    ans = a-1
else:
    ans = a
print(ans)

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())
print(a - (b<a))

Solution (Python):

a,b = input().split()

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

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 = map(int,input().split())
if a <= b:
  print(a)
else:
  print(a - 1)

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

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

Solution (Python):
a,b=map(int,raw_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())
count=0


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

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


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

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

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

Solution (Python):

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


def countTakahashiDays(a, b):
    return a - 1 + (1 if b >= a else 0)


print(countTakahashiDays(a, b))

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

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<=1 else a-1)

Solution (Python):
import datetime
a, b = map(int, input().split())
count = 0
for i in range(a):
    target_date_str = '2018'+'{0:02d}'.format(a)+'{0:02d}'.format(b)
    target_date_date = datetime.datetime.strptime(target_date_str, '%Y%m%d')
    current_date_date = datetime.datetime.strptime('2018'+'{0:02d}'.format(
        i+1)+'{0:02d}'.format(i+1), '%Y%m%d')
    if current_date_date <= target_date_date:
        count += 1
print(count)

Solution (Python):
ab = input().split()
a, b = int(ab[0]), int(ab[1])

if a > b:
    a -= 1;

print(a)

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

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

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

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

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

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:
    takahasi_day = a
else:
    takahasi_day = a-1
print(takahasi_day)

Solution (Python):


import sys

def readInts():
  line = sys.stdin.readline().rstrip("\n")
  return map(int, line.split())

def solve(a, b):
  n = a - 1
  if b >= a:
    n += 1
  return n

if __name__ == "__main__":
  a, b = readInts()
  ans = solve(a, b)
  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)
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())
th = a-1
if b>=a:
    th+=1
print(th)

Solution (Python):

m, d = map(int, raw_input().split())

count = 0

if m != 1:
    count = m - 1

if m <= d:
    count += 1

print count

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

takahashi = a - 1
if b >= a :
    takahashi = takahashi + 1

print('{}'.format(takahashi))

Solution (Python):



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


if a > b:
	ans = a-1

if a <= b:
	ans = a


print("{}".format(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 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())
ans = a - 1
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 - 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 = list(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-1)
else:
    print(a)

Solution (Python):
print((lambda a:a[0]-1+(a[1]>=a[0]))(map(int,raw_input().split())))

Solution (Python):
ab = input().split()

a = int(ab[0])
b = int(ab[1])

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())
x = a if a <= b else a-1
print(x)

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>12 or b>31 :
    print("none")
else:
    if a>b:
        print(a-1)
    else:
        print(a)

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

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

Solution (Python):


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

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

if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, raw_input().split())
print a if a <= b else 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 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())
c = 1 if int(a-b)>0 else 0
print(a-c)

Solution (Python):


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




ans = a - 1

if b >= a:
    ans += 1


print("{}".format(ans))

Solution (Python):


count = 0
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-1 if a>b else a)

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

if a == b:
    print(a)
elif a > b:
    print(a-1)
elif a < b:
    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 = list(map(int,input().split()))

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

Solution (Python):
a, b = input().split(" ")
a = int(a)
b = int(b)
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(' '))
takahashi = 0

for md in range(a):
    takahashi += 1


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

Solution (Python):
X = input().split()
a = int(X[0])
b = int(X[1])

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

print(takahashi)

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()))

same = 0

for i in range(a):
    if i + 1 == a:
        n = b
    else:
        n = 31
    for j in range(n):
        if i == j:
            same += 1

print(same)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b = LI()
    if a > b:
        return a -1

    return a



print(main())

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())
takahashi = a
if a > b:
    takahashi -= 1
print(takahashi)

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

Solution (Python):
m, d = map(int, input().split())

if d >= m:
  print(m)
else:
  print(m-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())

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

print(count)

Solution (Python):


a=(input())

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

a,b=c


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:
  print(a-1)
if a <= b:
  print(a)

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

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

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

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

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

Solution (Python):
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
if a == b:
    print(a)
elif 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):
ab = input().split()
a = int(ab[0])
b = int(ab[1])

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

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-1)
elif a <= b:
    print(a)

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

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

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

Solution (Python):
m, d = [int(i) for i in 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):
if __name__ == "__main__":

    date = input().replace("　", " ").split(" ")

    if date[0] <= date[1]:
        print(date[0])
    else:
        print(int(date[0])-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()))

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



if __name__ == '__main__':
    solve()

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:
    a -= 1
print(a)

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

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

Solution (Python):

if __name__ == "__main__":
    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)
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())

if a < b:
    print(a)

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

elif a == b:
    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("{}".format(a))
else:
    print("{}".format(a - 1))

Solution (Python):
month, day = [int(i) for i in input().split(" ")]

if month <= day:
    takahashi_day_num = month
else:
    takahashi_day_num = month - 1

print(takahashi_day_num)

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)
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())

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

print(res)

Solution (Python):





if __name__ == '__main__':
    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):
import sys
a, b = map(int, sys.stdin.readline().split(' '))
print(a if a <= b else a - 1)

Solution (Python):


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

def readQuestion():
    import sys
    line = sys.stdin.readline()
    sline = line.rstrip()
    str_a, str_b = sline.split(' ')
    a = int(str_a)
    b = int(str_b)
    return a, b

def main():
    a, b = readQuestion()
    ans = solve(a, b)
    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):


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

Solution (Python):
def getinputdata():

    
    array_result = []    
    data = input()
    array_result.append(data.split(" "))

    flg = True

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

a = int(arr_data[0][0])
b = int(arr_data[0][1])

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())
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):
a,b=map(int,raw_input().split());print a-(b<a)

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

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

Solution (Python):

"""
A - Day of Takahashi
https://abc096.contest.atcoder.jp/tasks/abc096_a

"""
import sys
from sys import stdin
input = stdin.readline


def calc_day_of_takahashi(m, d):
    if d >= m:
        return m
    else:
        return m - 1


def main(args):
    a, b = map(int, input().split())
    ans = calc_day_of_takahashi(a, b)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

Solution (Python):
from sys import stdin
a,b = map(int,stdin.readline().split())
ans = a-1
if b >= a:
 ans = a
print ans

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

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

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

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

r = a - 1 if b < a else a

print(r)

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

Solution (Python):
month, day = list(map(int, (input().split(" "))))
ans = month - 1
if month <= day:
    ans += 1

print(ans)

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

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

Solution (Python):
x,y = map(int,input().split())	
if y < x:
    x -=1
print(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())
print(a if b>=a else a-1)

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

Solution (Python):
X = input().split()
a = int(X[0])
b = int(X[1])

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

print(takahashi)

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())
takahashi = 0
 
for x in range(1, a):
    for y in range(1, 31):
        if x == y:
            takahashi += 1
 
for x in range(1, b+1):
    if x == a:
        takahashi += 1
print(takahashi)

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

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

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

Solution (Python):

"""
Created on Sat May  5 20:54:36 2018

@author: sakas
"""

X, Y = map(int, input().split())

if X > Y:
    print(X - 1)
else:
    print(X)

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):
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
if a == b:
    print(a)
elif a < b:
    print(a)
else:
    print(a-1)

Solution (Python):
import datetime

def checkDay(m, d):
    takahashis = [
        datetime.datetime(2018,1,1,0,0),
        datetime.datetime(2018,2,2,0,0),
        datetime.datetime(2018,3,3,0,0),
        datetime.datetime(2018,4,4,0,0),
        datetime.datetime(2018,5,5,0,0),
        datetime.datetime(2018,6,6,0,0),
        datetime.datetime(2018,7,7,0,0),
        datetime.datetime(2018,8,8,0,0),
        datetime.datetime(2018,9,9,0,0),
        datetime.datetime(2018,10,10,0,0),
        datetime.datetime(2018,11,11,0,0),
        datetime.datetime(2018,12,12,0,0)
    ]

    tgt = datetime.datetime(2018,m,d,0,0)
    res = 0
    for dt in takahashis:
        if dt <= tgt:
            res += 1
    return res

m, d = map(int, input().split())
res = checkDay(m, d)
print (res)

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-1)
else:
	print(a)

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

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

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

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

Solution (Python):
a, b = list(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):
x = [int(i) for i in input().split()]
if x[0] <= x[1]:
    print(x[0])
else:
    print(x[0] - 1)

Solution (Python):

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

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

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

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

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

Solution (Python):

a,b=map(int,raw_input().split())
if(a>b): print "%d"%(a-1)
else: print "%d"%(a)

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

Solution (Python):
s = input().rstrip().split()
a = int(s[0])
b = int(s[1])

if(a<=b):
  print("{}".format(a))
else:
  print("{}".format(a-1))

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

Solution (Python):
A, B = input().split()
A = int(A)
B = int(B)

if B >= A:
    print(A)
else:
    print(A-1)

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

c = 0

if a <= b:
    c = a

else:
    c = (a-1)


print(c)

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

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

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:
    a-=1
print(a)

Solution (Python):
a=[int(x) for x in input().split(' ')]
m, d = a
if d < m:
    print(m - 1)
else:
    print(m)

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

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

print(result)

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, raw_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):
def lii():
    return list(map(int, input().split(' ')))
a, b = lii()
if b < a:
    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):
numbers = input().split()
a = int(numbers[0])
b = int(numbers[1])
i = 1
while True:
    if a != i:
        i += 1
        continue
    else:
        if b < i:
            print(i - 1)
            break
        else:
            print(i)
            break

Solution (Python):
a = input().split(" ")
if int(a[0]) <= int(a[1]):
    print(int(a[0]))
else:
    print(int(a[0])-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(' ')))
result = a - 1
if b - a >= 0:
    result += 1
print(result)

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

Solution (Python):
m, d = map(int, input().split(' '))

if m <= d:
    print(m)
else:
    print(m-1)

Solution (Python):
s = input().split()
a, b = int(s[0]), int(s[1])
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)