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.



Sample input:
5 5


Sample output:
5

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

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

#############
# Main Code #
#############

a,b = inputIL()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
# A = int(input())
# B = int(input())
# C = int(input())
# X = input()
print(a if a <= b else a - 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
ab = int(a + b)
ans = 0
if 11 <= ab:
    ans += 1
if 22 <= ab:
    ans += 1
if 33 <= ab:
    ans += 1
if 44 <= ab:
    ans += 1
if 55 <= ab:
    ans += 1
if 66 <= ab:
    ans += 1
if 77 <= ab:
    ans += 1
if 88 <= ab:
    ans += 1
if 99 <= ab:
    ans += 1
if 1010 <= ab:
    ans += 1
if 1111 <= ab:
    ans += 1
if 1212 <= ab:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_96_A()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
m=[0,2,0,1,0,1,0,0,1,0,1,0]
d=[31,30,28]
takahashi=0
for i in range(len(m)):
    for j in range(d[m[i]]):
        if i==j: takahashi+=1
        if a==i+1 and b==j+1: break
    if a==i+1: break
print(takahashi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return list(sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
a, b = ri_()
print(a - 1 if b < a else a)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=a-1

if a <= b:
    print(c+1)
else:
    print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ct=0
for i in range(1,a+1):
    for j in range(1,32):
        if(a!=b):
            if(i==b):
                break
            elif(i==j):
                ct=ct+1
        elif(i==j):
            ct=ct+1
               
print(ct)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input().split()
a = int(x[0])
b = int(x[1])
count = a
if a > b:
  count -= 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

url = "https://atcoder.jp//contests/abc096/tasks/abc096_a"

def main():
    m, d = list(map(int, input().split()))
    ans = m
    if m > d:
        ans -= 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= b:
    print(a)

else:
    print(a-1)

Submission status: Accepted

Solution code:
import datetime
def main():
    a, b = map(int, input().split())
    cnt = 0
    for i in range(1, 13):
        if datetime.date(2018, i, i) <= datetime.date(2018, a, b):
            cnt += 1
    print(cnt)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, b = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    a, b = MII()
    cnt = a-1
    if b>=a: cnt+=1
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = a-1

if b >= a:
    ans += 1

print(ans)

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from datetime import datetime as dt
a = dt.strptime(input(), "%m %d")
print(sum(d <= a for d in [dt(1900,i,i) for i in range(1, 13)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    print(a-(a>b))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
def main():
  a,b = map(int,input().split())
  mm = a
  if a > b:
    mm -=1
  print(mm)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
a,b = iim()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
a,b = inputlist()
if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def DayofTaka(a , b):

    return a if a <= b else a - 1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print(A if A <= B else A-1)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, b = list(map(int, sys.stdin.buffer.readline().split()))
    print((a-1)+int(a<=b))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = 0

for i in range(1, a+1):
  day = b if i == a else 31
  for j in range(1, day+1):
    if i == j:
      ans += 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split(" ")]
print(int(l[0]-1+min(l[1]/l[0],1)))

Submission status: Accepted

Solution code:
# | Its_Rashid | #
a , b = map(int , input(). split())
print(a if a <= b else a - 1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

before = a - 1
now = 0
if a <= b:
  now = 1
  
print(before + now)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Day of Takahashi
a,b=list(map(int,input().split()))
if a<=b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#096_A
a,b=map(int,input().split())
print(a-1 if a>b else a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = 0

if a == b or a < b:
    ans += 1

for i in range(1, a):
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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


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

Submission status: Accepted

Solution code:
m=[31,28,31,30,31,30,31,31,30,31,30,31]
a,b=map(int,input().split())
ans=0
for month in range(a):
  for day in range(m[month]):
    if month==a-1 and day+1>b:
      break
    if month==day:
      ans+=1
print(ans)

Submission status: Accepted

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

if a <= b:
    print(a)

else:
    print(a-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

num = a

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = map(int,raw_input().split())
if y >= x:
    print x
elif y < x:
    print x-1

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda x: [ns() for _ in range(x)]
nas = lambda: stdin.readline().split()

a, b = na()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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