Harryxun/stf_run huggingface dataset:
// #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")

#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1*INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1*LLINF;

template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ";
    return os << "}";
}

template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
	return os << "[ " << p.first << ", " << p.second << "]" ;
}

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pd;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<ld> vld;
typedef vector<pi> vpi;
typedef vector<vector<int>> vvi;
typedef vector<vll> vvll;
typedef vector<vd> vvd;
typedef vector<vld> vvld;
 
#define mp make_pair
#define pb push_back
#define pf push_front
#define all(x) x.begin(), x.end()
#define revAll(x) x.rbegin(), x.rend()
#define gcd(a, b) __gcd(a, b)
#define popcount(x) __builtin_popcount(x)
#define isize(x) (int)(x.size())
#define rep(i,n) for(int i = 0; i < n; i++)
#define rep1(i, n) for(int i = 1; i < n+1; i++)
#define umap unordered_map

const ll MOD = 1e9 + 7;

void madd(ll& a, ll b){
	a += b;
	if (a >= MOD) a -= MOD;
}

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);
	string K; cin >> K;
	int D; cin >> D;
	vi lim = vi();
	for(const auto& c : K){
		lim.pb((int)(c - '0'));
	}
	int n = isize(lim);
	ll dp[n+1][2][D];
	rep(i,n+1)rep(j, 2)rep(k, D) dp[i][j][k] = 0;
	dp[0][1][0] = 1;

	for(int i = 0; i < n; i++){
		for(int tight = 0; tight <= 1; tight++){
			for(int ds = 0; ds < D; ds++){
				int md = tight ? lim[i] : 9;
				for(int d = 0; d <= md; d++){
					int nt = (tight and lim[i] == d) ? 1 : 0;
					int nds = (d + ds) % D;
					madd(dp[i+1][nt][nds], dp[i][tight][ds]);
				}
			}
		}
	}
	ll ans = 0;
	madd(ans, dp[n][0][0]);
	madd(ans, dp[n][1][0]);
	cout << ans-1;	
}

### FIXED CODE ###

from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict
from functools import lru_cache

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

setrecursionlimit(100000)

def main():
	MOD = 10**9 + 7
	k, d = int(rl()), int(rl())
	ans = 0

	def totup(num):
		ans = deque()
		while num:
			num, dig = divmod(num, 10)
			ans.appendleft(dig)
		return tuple(ans)

	x = totup(k)

	dp = [[[0]*2 for j in range(d)] for i in range(len(x)+1)]
	dp[0][0][1] = 1
	for i in range(len(x)):
		for digsum in range(d):
			for tight in range(2):
				for dig in range(x[i]+1 if tight else 10):
					ns = (digsum + dig) % d 
					ntight = 1 if tight and dig == x[i] else 0
					dp[i+1][ns][ntight] += dp[i][digsum][tight]
					dp[i+1][ns][ntight] %= MOD

	ans = (dp[len(x)][0][0] + dp[len(x)][0][1] - 1) % MOD
	print(ans)
	stdout.close()

if __name__ == "__main__":
	main()
#!/usr/bin/env python3

s = input()
t = input()

errors = []
for i in range(len(s)-len(t)+1):
    error = 0 
    for j in range(len(t)):
        if s[i+j] != t[j]:
            error += 1
    errors.append(error)
print(min(errors)

### FIXED CODE ###

#!/usr/bin/env python

s = input()
t = input()

errors = []
for i in range(len(s)-len(t)+1):
    error = 0 
    for j in range(len(t)):
        if s[i+j] != t[j]:
            error += 1
    errors.append(error)
print(min(errors))
H, W, K = map(int, input().split())

def clear(row, start, end, mult):
    if end - start + 1 < K:
        return 0
    gain = 0
    for i in range(start, end + 1):
        gain += mult * row[i]
        row[i] = 0
    return gain

def drop(board):
    for x in range(W):
        wp = 0
        for y in range(H):
            if board[y][x] > 0:
                board[wp][x] = board[y][x]
                if wp != y:
                    board[y][x] = 0
                wp += 1

def proceed(board, mult):
    gain = 0
    for row in board:
        start = -1
        num = -1
        for i in range(W):
            if row[i] == num:
                continue
            else:
                gain += clear(row, start, i-1, mult)
                num = row[i]
                start = i
        if num > 0:
            gain += clear(row, start, W-1, mult)
    drop(board)
    return gain

board_ = []
for _ in range(H):
    board_.append(list(map(int, input())))
board_.reverse()

ans = 0
for y in range(H):
    for x in range(W):
        board = deepcopy(board_)
        board[y][x] = 0
        drop(board)
        mult = 1
        cand = 0
        while True:
            gain = proceed(board, mult)
            if gain == 0:
                break
            cand += gain
            mult *= 2
        ans = max(ans, cand)
print(ans)

### FIXED CODE ###

from copy import deepcopy
H, W, K = map(int, input().split())

def clear(row, start, end, mult):
    if end - start + 1 < K:
        return 0
    gain = 0
    for i in range(start, end + 1):
        gain += mult * row[i]
        row[i] = 0
    return gain

def drop(board):
    for x in range(W):
        wp = 0
        for y in range(H):
            if board[y][x] > 0:
                board[wp][x] = board[y][x]
                if wp != y:
                    board[y][x] = 0
                wp += 1

def proceed(board, mult):
    gain = 0
    for row in board:
        start = -1
        num = -1
        for i in range(W):
            if row[i] == num:
                continue
            else:
                gain += clear(row, start, i-1, mult)
                num = row[i]
                start = i
        if num > 0:
            gain += clear(row, start, W-1, mult)
    drop(board)
    return gain

board_ = []
for _ in range(H):
    board_.append(list(map(int, input())))
board_.reverse()

ans = 0
for y in range(H):
    for x in range(W):
        board = deepcopy(board_)
        board[y][x] = 0
        drop(board)
        mult = 1
        cand = 0
        while True:
            gain = proceed(board, mult)
            if gain == 0:
                break
            cand += gain
            mult *= 2
        ans = max(ans, cand)
print(ans)
import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = inp()
A = inpl()
A.sort()
dp = [False] * 1001001
nt = -1
for i in A:
    if i != nt:
        dp[i] = True
    else:
        dp[i] = False
    nt = i

ans = 0
mx = A[N-1]
for i in A:
    if dp[i]:
        ans += 1
        j = i
        while j <= 1001001:
            dp[j] = False
            j += i
print(ans)

# -----------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)


### FIXED CODE ###

import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
start_time = time.perf_counter()
# ------------------------------

N = inp()
A = inpl()
A.sort()
dp = [False] * 1001001
nt = -1

for i in A:
    if i != nt:
        dp[i] = True
    else:
        dp[i] = False
    nt = i

ans = 0
mx = A[N-1]
nt = -1
for i in A:
    if dp[i]:
        ans += 1
    if i == nt:
        continue
    nt = i
    j = i
    while j <= mx:
        dp[j] = False
        j += i

print(ans)

# -----------------------------
end_time = time.perf_counter()
print('time:', end_time-start_time, file=sys.stderr)
import sympy as sym

A = sym.sequence(N*(N+1)/2,(n, 1, 100))
print([int(N) for in A])
print(A[3])

### FIXED CODE ###

N = int(input())

print(int(N*(N+1)/2))
k, s = list(map(int, input().split()))
ct = 0
for x in range(k+1):
    for y in range(x, k+1):
        if x + y > s:
            break;
        for z in range(y, k+1):
            if x + y + z == s:
                if x == y and y == z:
                    ct += 1
                elif x != y and y != z:
                    ct += 6
                else:
                    ct += 3
                break;
print(ct)

### FIXED CODE ###

import sys
import copy
import string
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

li = input().split(",")
print(*li)
a, b = map(int, input().split())
  if a*b % 2 == 0 :
    print("Even")
  else:
    print("Odd")


### FIXED CODE ###

a, b = map(int, input().split())
print("Odd" if a * b % 2 else "Even")
a = input().int()
s = input() 

if a>=3200:print (s) 
else: print ("red")


### FIXED CODE ###

a = int(input())
s = input() 

if a>=3200:print (s) 
else: print ("red")
from collections import Counter
N,K = [int(i) for i in input().split()] 
A = [int(i) for i in input().split()]
counter = Counter(A)
ans = 0
counter_list = counter.most_common()
while (K!=len(counter_list)):
    ans += counter_list[-1][1]
    counter_list = counter_list[:-1]
    
print(ans)

### FIXED CODE ###

from collections import Counter
N,K = [int(i) for i in input().split()] 
A = [int(i) for i in input().split()]
counter = Counter(A)
ans = 0
counter_list = counter.most_common()[::-1]
if K < len(counter_list):
    for a in counter_list[:len(counter_list)-K]:
        ans += a[1]
print(ans)
def g(x):
  S=format(x,"20b")
  cnt=0
  for i in range(15):
    if S[-1-i]=="1":
      cnt=cnt+1
  return x%cnt

n=int(input())
X=input()
a=0
for i in range(n):
  if X[i]=="1":
    a=a+1
#最初に割るのは a-1 or a+1 -> a==1,0に注意
if a==0:
  for i in range(n):
    print(1)
  exit()
if a==1:
  if X[-1]=="1":
    for i in range(n-1):
      print(2)
    print(0)
    exit()
  else:
    for i in range(n):
      if X[i]=="1":
        print(0)
      else:
        print(1)
    exit()
D=[1]*n
E=[1]*n
D[0]=D[0]%(a-1)
E[0]=E[0]%(a+1)
b=int(X[-1])%(a-1)
c=int(X[-1])%(a+1)
for i in range(n-1):
  D[i+1]=(D[i]*2)%(a-1)
  E[i+1]=(E[i]*2)%(a+1)
  if X[-2-i]=="1":
    b=(b+D[i+1])%(a-1)
    c=(c+E[i+1])%(a+1)
for i in range(n):
  if X[i]=="1":
    x=(b+a-1-D[-1-i])%(a-1)
    ans=1
    while x!=0:
      x=g(x)
      ans=ans+1
    print(ans)
  else:
    x=(c+E[-1-i])%(a+1)
    ans=1
    while x!=0:
      x=g(x)
      ans=ans+1
    print(ans)

### FIXED CODE ###

def g(x):
  S=format(x,"22b")
  cnt=0
  for i in range(20):
    if S[-1-i]=="1":
      cnt=cnt+1
  return x%cnt

n=int(input())
X=input()
a=0
for i in range(n):
  if X[i]=="1":
    a=a+1
#最初に割るのは a-1 or a+1 -> a==0,1 に注意
if a==0:
  for i in range(n):
    print(1)
  exit()
if a==1:
  if X[-1]=="1":
    for i in range(n-1):
      print(2)
    print(0)
    exit()
  else:
    for i in range(n-1):
      if X[i]=="1":
        print(0)
      else:
        print(1)
    print(2)
    exit()
D=[0]*n
E=[0]*n
D[0]=1%(a-1)
E[0]=1%(a+1)
b=int(X[-1])%(a-1)
c=int(X[-1])%(a+1)
for i in range(n-1):
  D[i+1]=(D[i]*2)%(a-1)
  E[i+1]=(E[i]*2)%(a+1)
  if X[-2-i]=="1":
    b=(b+D[i+1])%(a-1)
    c=(c+E[i+1])%(a+1)
for i in range(n):
  if X[i]=="1":
    x=(b+a-1-D[-1-i])%(a-1)
    ans=1
    while x!=0:
      x=g(x)
      ans=ans+1
    print(ans)
  else:
    x=(c+E[-1-i])%(a+1)
    ans=1
    while x!=0:
      x=g(x)
      ans=ans+1
    print(ans)
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
a = [I() for i in range(5)]

print(math.ceil(N/min(a))+4)

### FIXED CODE ###

import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
A = [I() for i in range(5)]
num = min(A)

print(4 + math.ceil(N/num))
N, K = map(int, input().split())
A = [int(i) for i in input().split()]

# print(math.log2(10**12))
sum = [0 for i in range(K)]

for x in range(K):
    y = [int(x / (2 ** i)) % 2 for i in range(40)]  # log2(10**12) < 40
    for n in range(N):
        for j in range(40):
            z = int(A[n] / (2 ** j)) % 2
            if (z > 0) ^ (y[j] > 0):
                sum[x] += 2 ** j
print(max(sum))


### FIXED CODE ###

N, K = map(int, input().split())
A = [int(i) for i in input().split()]
max_bit = 40
dp = [[-1] * 2 for i in range(41)]  # dp[i][j] = 上からi bitまで、j smaller

dp[0][0] = 0
for d in range(max_bit):
    mask = 1 << (max_bit-d-1)

    # Aでもともとd bit目にbitが立っているものの個数
    num = len([1 for i in range(N) if A[i] & mask])
    #print([1 for i in range(N) if A[i] & mask])

    # Xのbit bit目を0,1にしたときのコスト
    cost0 = mask * num
    cost1 = mask * (N - num)
    # smaller -> smaller
    if dp[d][1] != -1:
        # 0でも1でもいい！
        dp[d + 1][1] = max(dp[d + 1][1], dp[d][1] + max(cost0, cost1))

    # exact -> smaller
    if dp[d][0] != -1:
        if K & mask:  # kのd桁目が1だったらXのd桁目は0にする
            dp[d + 1][1] = max(dp[d + 1][1], dp[d][0] + cost0)

    # exact -> exact
    if dp[d][0] != -1:
        if K & mask:
            dp[d + 1][0] = max(dp[d + 1][0], dp[d][0] + cost1)
        else:
            dp[d + 1][0] = max(dp[d + 1][0], dp[d][0] + cost0)

# print(dp)
print(max(dp[max_bit][0], dp[max_bit][1]))
import nampy as np
k = int(input())

ans = 0
for a in range(1,k+1):
  for b in range(1,k+1):
    tmp = np.gcd(a,b)
    for c in range(1,k+1):
      ans += np.gcd(tmp,c)

print(ans)


### FIXED CODE ###

import math
k = int(input())

ans = 0
for a in range(1,k+1):
  for b in range(1,k+1):
    tmp = math.gcd(a,b)
    for c in range(1,k+1):
      ans += math.gcd(c,tmp)

print(ans)
import sys
input = sys.stdin.readline

X,Y,Z,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

AX=[A[0]-a for a in A]
BX=[B[0]-b for b in B]
CX=[C[0]-c for c in C]

AX.append(float("inf"))
BX.append(float("inf"))
CX.append(float("inf"))


i=0
j=0
k=0

while (i+1)*(j+1)*(k+1)<K:
    MIN=min(AX[i+1],BX[j+1],CX[k+1])

    if MIN==AX[i+1]:
        i+=1
    if MIN==BX[j+1]:
        j+=1
    if MIN==CX[k+1]:
        k+=1

MAX=A[i]+B[i]+C[i]
MIN=A[0]+B[0]+C[0]-MAX

LIST=[]
for i in range(X):
    if A[0]-A[i]>MIN:
        break
    
    for j in range(Y):
        if A[0]+B[0]-A[i]-B[j]>MIN:
            break

        for k in range(Z):
            if A[i]+B[j]+C[k]>=MAX:
                LIST.append(A[i]+B[j]+C[k])
            else:
                break

LIST.sort(reverse=True)

for j in range(K):
    print(LIST[j])
            
    


### FIXED CODE ###

import sys
input = sys.stdin.readline

X,Y,Z,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

AB=[]
for a in A:
    for b in B:
        AB.append(a+b)

AB.sort(reverse=True)
AB=AB[:K]

ALL=[]

for ab in AB:
    for c in C:
        ALL.append(ab+c)

ALL.sort(reverse=True)

for k in range(K):
    print(ALL[k])
from collections import deque

def cndP(w):
    if len(w)>1:
        x = w.pop()
        cndP(w.copy())
        w.append(x)
        s = 0
        while(len(w)>0):
            s += w.pop()
            st.add(s)
    else:
        st.add(w[0])
        
def pIsAccptbl(w,k,p):
    tr = 0
    c = 0
    d = w.copy()
    while(d):
        tmp = d.popleft()
        if(tmp > p):
            return False
        
        if( tr + tmp > p):
            tr = tmp
            c += 1
        else:
            tr += tmp
        if c+1>k:
            return False
    return True

n,k = [int(x) for x in input().split()]
w = deque()

for i in range(n):
    w.append(int(input()))
    
st = set()
from collections import deque

def cndP(w):
    if len(w)>1:
        x = w.pop()
        cndP(w.copy())
        w.append(x)
        s = 0
        while(len(w)>0):
            s += w.pop()
            st.add(s)
    else:
        st.add(w[0])
        
def pIsAccptbl(w,k,p):
    tr = 0
    c = 0
    d = w.copy()
    while(d):
        tmp = d.popleft()
        if(tmp > p):
            return False
        
        if( tr + tmp > p):
            tr = tmp
            c += 1
        else:
            tr += tmp
        if c+1>k:
            return False
    return True

n,k = [int(x) for x in input().split()]
w = deque()

for i in range(n):
    w.append(int(input()))
    
st = set()
cndP(w.copy)

### FIXED CODE ###

from collections import deque

def isPa(w,k,p):
    tr = 0
    c = 0
    d = deque(w)
    while(d):
        tmp = d.popleft()
        if(tmp > p):
            return False
        
        if( tr + tmp > p):
            tr = tmp
            c += 1
        else:
            tr += tmp
        if c+1>k:
            return False
    return True

def MaxInP(w,k,p):
    maxinp = 0
    tmp = 0
    d = deque(w)
    while(d):
        tmp += d.popleft();
        if(tmp > p):
            if(tmp > maxinp):
                maxinp = tmp
            tmp = 0
    return maxinp

n,k = [int(x) for x in input().split()]
w = deque()
for i in range(n):
    w.append(int(input()))
    
mean = int(sum(w)/k)
maxinp = MaxInP(w,k,mean)

if k == 1:
    print(mean)
else:
    minP = mean
    maxP = maxinp
    while(True):
        m = int ((minP + maxP)/2)
        if ( isPa(w,k,m) ):
            maxP = m
        else:
            minP = m
        if (minP+1 == maxP or minP == maxP):
            print(maxP)
            break
"""Coloring Edges on Tree
https://atcoder.jp/contests/abc146/tasks/abc146_d
"""
import sys
input = sys.stdin.readline


class Node:
    def __init__(self, num):
        self.num = num
        self.edge = []
        self.edge_color = []


def dfs(node, p):
    # print(node.num, p)
    for e in node.edge:
        used_color = node.edge_color
        if e != p:
            # 子のノードを取得
            child = tree[e]
            child_used_color = child.edge_color

            # このnodeと子のノードでまだ使っていない色を特定
            unused_colors = list(set(colors) - set(used_color + child_used_color))
            if len(unused_colors) == 0:
                color_num = max(colors) + 1
                colors.append(color_num)
            else:
                color_num = unused_colors.pop()

            # このノードと、子のノードに使用ずみの色をマーク
            node.edge_color.append(color_num)
            child.edge_color.append(color_num)

            # 答えを記録
            ans['{a} {b}'.format(a=node.num, b=child.num)] = color_num

            # 掘る
            dfs(child, node.num)


N = int(input())
ans = {}
colors = [1]

# treeの初期化
tree = []
edges = []
tree.append(Node(0))
for i in range(1, N + 1):
    tree.append(Node(i))
for i in range(N - 1):
    inp = input().split()
    edges.append(inp)
    a, b = map(int, inp)
    tree[a].edge.append(b)
    tree[b].edge.append(a)


dfs(tree[1], -1)


print(len(colors))
for e in edges:
    # print(e)
    print(str(ans.get(' '.join(e))))


### FIXED CODE ###

"""Coloring Edges on Tree
https://atcoder.jp/contests/abc146/tasks/abc146_d
"""
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 5 + 1)

class Node:
    def __init__(self, num):
        self.num = num
        self.edge = set()
        self.edge_color = set()


def dfs(node, c = -1 , p = -1):
    k = 1    
    for e in node.edge:
        if e == p:
            continue
        if k == c:
            k += 1
        # 子のノードを取得
        child = tree[e]

        # 答えを記録
        if a < b:
            ans['{0} {1}'.format(node.num, child.num)] = k
        else:
            ans['{0} {1}'.format(child.num, node.num)] = k
        k += 1

        # 掘る
        dfs(child,k - 1, node.num)


N = int(input())
ans = {}
# colors = {1}

# treeの初期化
tree = [Node(i) for i in range(0, N + 1)]
edges = []
for i in range(N - 1):
    a, b = map(int, input().split())
    tree[a].edge.add(b)
    tree[b].edge.add(a)
    if a < b:
        edges.append('{0} {1}'.format(a, b))
    else:
        edges.append('{0} {1}'.format(b, a))

dfs(tree[1], -1)

# print("edges:{}".format(edges))
# print(max(c))
# print(ans)
count = 0
for node in tree:
    count = max(count, len(node.edge))
print(count)
for edge in edges:
    # print(edge)
    print(str(ans.get(edge)))
from math import gcd
a,b,k=map(int,input().split())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

C=make_divisors(gcd(a,b))
C.sort()
#print(C)
print(C[-k])


### FIXED CODE ###

from fractions import gcd
a,b,k=map(int,input().split())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

C=make_divisors(gcd(a,b))
C.sort()
#print(C)
print(C[-k])
n = map(int, raw_input().split())
sorted(n),reverse=True)[:3]

### FIXED CODE ###

n=[]
for i in range(0, 10):
    n.append(int(raw_input()))
for i in sorted(n,reverse=True)[:3]:
    print i
x=list(map(int,input().split()))
a=x[0]
b=x[1]
if a<=b:
  print(a)
else:
  priint(a-1)

### FIXED CODE ###

x=list(map(int,input().split()))
a=x[0]
b=x[1]
if a<=b:
  print(a)
else:
  print(a-1)
N = int(input())
cnt = 0
for i in range(N):
  if len(i)%2 == 1:
    cnt += 1
print(cnt)


### FIXED CODE ###

N = int(input())
cnt = 0
for i in range(1,N+1):
  if len(str(i))%2 == 1:
    cnt += 1
print(cnt)
import math as m
a,b,c = map(int,input().split())
if (c - a - b)**2 < 10**9:
	print("Yes" if 4*a*b < (c - a - b)**2 else "No")
else:
	print("Yes" if m.log(4*a*b) < 2*log((c - a - b)) else "No")



### FIXED CODE ###

import math as m
a,b,c = map(int,input().split())
print("Yes" if 4*(a*b) < (c - a - b)**2 and c-a-b > 0 else "No")
N = int(input())
A = list(map(int, input().split()))

ans = 0
def main(i, A):
  global N
  global ans
  if A[i] == A[i+1]:
    if i == N-2:
      ans += 1
      return ans
    else:
      return main(i+1, A)
  elif A[i] < A[i+1]:
    while i < N-1:
      if A[i] <= A[i+1]:
        i += 1
      else:
        ans += 1
        if i == N-2:
          ans += 1
          return ans
        else:
          return main(i+1, A)
    else:
      ans += 1
      return ans
  else:
    while i < N-1:
      if A[i] >= A[i+1]:
        i += 1
      else:
        ans += 1
        if i == N-2:
          ans += 1
          return ans
        else:
          return main(i+1, A)
    else:
      ans += 1
      return ans
    
print(main(0, A))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
N = int(input())
A = list(map(int, input().split()))

ans = 0
def main(i, A):
  global N
  global ans
  if A[i] == A[i+1]:
    if i == N-2:
      ans += 1
      return ans
    else:
      return main(i+1, A)
  elif A[i] < A[i+1]:
    while i < N-1:
      if A[i] <= A[i+1]:
        i += 1
      else:
        ans += 1
        if i == N-2:
          ans += 1
          return ans
        else:
          return main(i+1, A)
    else:
      ans += 1
      return ans
  else:
    while i < N-1:
      if A[i] >= A[i+1]:
        i += 1
      else:
        ans += 1
        if i == N-2:
          ans += 1
          return ans
        else:
          return main(i+1, A)
    else:
      ans += 1
      return ans
    
if N == 1:
  print(1)
else:
  print(main(0, A))
n = (input)
if 9 in n:
    print('Yes')
else:
    print('No') 

### FIXED CODE ###

n = input()
if '9' in n:
    print('Yes')
else:
    print('No')
s = input().relace(",", " ")
print(s)

### FIXED CODE ###

s = input().replace(",", " ")
print(s)