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):
import math

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):
num = list(map(int, input().split()))
if(num[0]<=num[1]):
	print(num[0])
else:
	print(num[0]-1)

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().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())

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

print(ans)

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

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

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

print(a if b >= a else 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-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-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):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b = INTM()
    if a>b:
        print(a-1)
    else:
        print(a)
if __name__ == '__main__':
    do()

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

Solution (Python):

import sys


def solve(a: int, b: int):
    ans = a
    if b < a and a != 1:
        ans -= 1
    print(ans)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    solve(a, b)

if __name__ == '__main__':
    main()

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())
ans = 0
for i in range(1,13):
    if i<a:
      ans += 1
    elif i == a and b >= a:
      ans += 1
        
print(ans)

Solution (Python):
a, b = map(int, input().split())
ans = 0
for i in range(1, a):
    for j in range(1, 32):
        if i == j:
            ans += 1
for k in range(1, b + 1):
    if k == a:
        ans += 1
print(ans)

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

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

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

print(ans)

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

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

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

print(a-int(b<a))

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

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

Solution (Python):

import math



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

Solution (Python):
def examA():
    a, b = LI()
    ans = a
    if a>b:
        ans -=1
    print(ans)



import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

Solution (Python):

import sys, math, itertools, heapq, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = 1
count = 0

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 = [int(x) for x 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())

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

print(ans)

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

a, b = MAP()

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

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

Solution (Python):
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().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):
if __name__ == "__main__":
    date = input().split(" ")
    if date[0] <= date[1]:
        print(date[0])
    else:
        print(int(date[0])-1)

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

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

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

Solution (Python):
import datetime
a,b = list(map(int, input().split()))
cnt = 0
pro = datetime.date(2018, a, b)

for i in range(1, 13):
  if(datetime.date(2018, i, i) <= pro):
    cnt +=1
print(cnt)

Solution (Python):
def main():
    a,b = list(map(int,input().split()))
    print(solve(a,b))
def solve(a,b):
    m = a-1
    n = 1 if a <= b else 0
    return m + n

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

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

Solution (Python):
a, b = [int(i) for i in 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):
import sys
def input(): return sys.stdin.readline().strip()

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

main()

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

Solution (Python):


import sys










def main():
    a, b = (int(x) for x in sys.stdin.readline().split())
    ans = a if b >= a else a - 1
    print(ans)


if __name__ == "__main__":
    
    main()

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

Solution (Python):

a, b = [int(s) for s in 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-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())
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)
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())

s = a - 1

if b >= a :
	s = s + 1
	
print(s)

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

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

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

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

if __name__ == '__main__':
    print(main())

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

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

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

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

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):
INPUT = list(map(int,input().split()))
a=INPUT[0]
b=INPUT[1]

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

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

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

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

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

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

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

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

Solution (Python):
a,b = 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-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)
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):
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):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    print(a if b >= a else a - 1)


if __name__ == '__main__':
    slove()

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

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

a=x-1

if x<=y:
  a+=1

print(a)

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

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-1 if a>b else 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)
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 = [int(x) for x in 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())

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

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

aa096()

Solution (Python):
a,b=[int(s) for s 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-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())
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):
month, day = map(int, input().split())

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

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

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

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

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

main()

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=[int(i) for i in input().split()]
if b>=a:
  print(a)
elif b<a:
  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())
print(A -1 if A > B else 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())
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):
def main():
    a,b = map(int, input().split())
    
    print(a if b >= a else a-1)

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

if __name__ == "__main__":
    main()

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

Solution (Python):



def main():


    N, M = map(int,input().split())

    if M < N:
        print(N-1)
    else:
        print(N)









if __name__ == "__main__":
    main()

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b=map(int,input().split())

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

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

Solution (Python):
a,b = map(int, input().strip().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(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-(a>b))

Solution (Python):
a, b = 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-1)
else:
  print(a)

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

Solution (Python):
a, b = map(int, input().split())
count_takahashi = 0
for month in range(1, a + 1):
    if month != a:
        count_takahashi += 1
    else:
        if b >= month:
            count_takahashi += 1

print(count_takahashi)

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

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

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

Solution (Python):

def main():
	line = input()
	vector = [int(x) for x in line.split()]
	a = vector[0]
	b = vector[1]
	if a <= b:
		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())
print(a) if a <= b else print(a-1)

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

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

Solution (Python):

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

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

ans = a - 1

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

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

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

Solution (Python):

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

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

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

Solution (Python):
a, b = list(map(int, input().split()))
count = 0
m = [i for i in range(1, a)]
for month in m:
    count += 1
if b >= a:
    count += 1
print(count)

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

Solution (Python):
from datetime import date, timedelta

a, b = map(int, input().split())
d1 = date(year=2018, month=1, day=1)
d2 = date(year=2018, month=a, day=b)

count = 0
while d1 <= d2:
    if d1.month == d1.day:
        count += 1
    d1 += timedelta(days=1)

print(count)

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

ans = a - 1
if b >= a:
    ans += 1
print(ans)

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


if a == 12:
  if b >= 12:
    print(12)
elif a == 11:
  if b >= 11:
    print(11)
  else:
    print(10)
elif a == 10:
  if b >= 10:
    print(10)
  else:
    print(9)
elif a == 9:
  if b >= 9:
    print(9)
  else:
    print(8)
elif a == 8:
  if b >= 8:
    print(8)
  else:
    print(7)

elif a == 7:
  if b >= 7:
    print(7)
  else:
    print(6)

elif a == 6:
  if b >= 6:
    print(6)
  else:
    print(5)

elif a == 5:
  if b >= 5:
    print(5)
  else:
    print(4)

elif a == 4:
  if b >= 4:
    print(4)
  else:
    print(3)

elif a == 3:
  if b >= 3:
    print(3)
  else:
    print(2)

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

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

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

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

a, b =  map(int, sys.stdin.readline().split())

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

Solution (Python):
(a, b) = (int(tok) for tok in input().split())
res = a - 1
  
if b >= a:
	res += 1

print(res)

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