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-----
5 5

-----Sample Output-----
5

There are five days that are Takahashi: 1-1, 2-2, 3-3, 4-4 and 5-5.

Difficulty: introductory

Starter code:

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

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

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

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

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

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

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

print(res)


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

def __starting_point():
    main()

__starting_point()

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

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

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

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

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

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

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

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

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

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

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

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

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

ans=a-1

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

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

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

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


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

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

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

ans = a - (a>b)
print(ans)

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

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

import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a, b = LI()

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

def __starting_point():
    resolve()

__starting_point()

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

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

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

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

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

#!/usr/bin/env python3

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

ans = 0
for i in range(1, 13):
    if i < a:
        ans += 1
    elif i == a:
        if i <= b:
            ans += 1
print(ans)


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

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

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

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

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

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


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

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

A, B = [int(i) for i in input().split()]

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


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

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

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


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

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

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

month, day = map(int, input().split())
takahashi_days = month
if day >= month:
    print(takahashi_days)
elif month > day:
    print(takahashi_days -1)

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

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

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

lst = input().split()
a = int(lst[0])
b = int(lst[1])

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

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

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

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

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

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


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

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

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

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

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

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

cnt = a - (1 if a > b else 0)

print(cnt)

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

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


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

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

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


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

M,D = map(int,input().split())
print(M-1+(0,1)[D>=M])

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

print((a - int(a > b)))


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

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

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

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

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

def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()

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


main()

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

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

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

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

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

#
# abc096 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """5 5"""
        output = """5"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """2 1"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """11 30"""
        output = """11"""
        self.assertIO(input, output)


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

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


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

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

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

# -*- coding: utf-8 -*-
a, b = list(map(int, input().split()))
if a > b:
    print((a-1))
else:
    print(a)


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

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

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

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

a,b=list(map(int,input().split()))
ans=0
ans+=a

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


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

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


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

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

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

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

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

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

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

a,b=list(map(int,input().split(" ")))
print((a+(b>=a)-1))


A,B=map(int,input().split())
print(A-(A>B))

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


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

n,m = [int(x) for x in input().split()]
if n <= m:
  print(n)
else:
  print(n-1)

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

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

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