peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
x=int(input())
y=list(map(int, input().split()))
ans=0
count=0
for i in range((x-1),0,-1):
	if y[i]<=y[i-1]:
		count=count+1
	else:
		if ans<count:
			ans=count
		count=0
if ans<count:
	ans=count
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
h = list(map(int, input().split())) 
a = [list(map(int,input().split())) for i in range(m)]
b = [0] * n
for i in range(m):
 if h[a[i][0]-1] > h[a[i][1]-1]:
   b[a[i][1]-1] +=1
 if h[a[i][0]-1] < h[a[i][1]-1]:
   b[a[i][0]-1] +=1
 if h[a[i][0]-1] == h[a[i][1]-1]: 
   b[a[i][1]-1] +=1
   b[a[i][0]-1] +=1
print(b.count(0))
# Judge status: Accepted

S = input()
N = len(S)
cnt0 = S.count("0")
cnt1 = S.count("1")
ans = 2*min(cnt0, cnt1)
print(ans)
# Judge status: Wrong Answer
s=int(input())

cnt=0

while s!=4:
  if s%2!=0:
    s=3*s+1
    cnt+=1
  elif s%2==0:
    s=s//2
    cnt+=1

if s==4:
  print(cnt+4)
# Judge status: Wrong Answer
n=int(input())
x=0
b=[]
s=input()
for S in s:
    if S=='I':
        x += 1
        b.append(x)
    else:
        x -= 1
        b.append(x)
print(max(b))
# Judge status: Accepted
r, g , b = map(int, input().split())
k = int(input())
while(g <= r):
	g *= 2
	k -= 1
while(b <= g):
	b *= 2
	k -= 1
if k >= 0:
	print("Yes")
else:
	print("No")
# Judge status: Accepted
n = int(input())
for i in range(1, 180, 1):
  if(360*i % n == 0):
    print(int(360*i//n))
    exit(0)
# Judge status: Wrong Answer
a, b, c = (int(i) for i in input().split())
if a+b <= c:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
S=set(input())

if len(S)==2:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import queue

K = int(input())
A = queue.Queue()

for i in range(1, 10):
        A.put(i)

num = 0
while num < K:
        emp = A.get()
        var = emp % 10
        if var != 0:
                A.put(emp*10+var-1)
        A.put(10*emp)
        if var != 9:
                A.put(emp*10+var+1)
        num += 1
        print(num, emp)

print(emp)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cnt = A[0]

if N == 1:
  print(A[0] + B[0])
  exit()

for i in range(N-1):
  if sum(A[i+1:]) > sum (B[i:-1]):
    cnt += A[i+1]
    
  else:
    cnt += B[i]
    print(cnt + sum(B[i+1:]))
    exit()


print(cnt + B[-1])
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))

a.sort()

print(sum(a[N:][0::2]))
# Judge status: Accepted
A,B,C = map(int,input().split())
if A+B >= C:
	print("Yes")
else:
	print("No")
# Judge status: Wrong Answer
ABC=input().split()

five_count=ABC.count("5")
seven_count=ABC.count("7")

if five_count == 2 and seven_count==1:
  print("Yes")
else:
  print("NO")
# Judge status: Wrong Answer
def calc(num):
  num += 1
  if num <= 2:
    return 1
  else:
    return num // 2 + 1

txt = input()
total = 0
renzoku = 0
for i in range(len(txt) - 1):
  #print(txt[i], txt[i + 1])
  if txt[i] != txt[i + 1]:
    if renzoku == 0:
      total += 1
    else:
      total += calc(renzoku)
    renzoku = 0
  else:
    #print(i, "renozku")
    renzoku += 1
if renzoku != 0:
  total += calc(renzoku)
else:
  total += 1
print(total)
# Judge status: Accepted
a, b = map(int, input().split())
if (a + b) % 3 == 0 or b % 3 == 0 or a % 3 == 0:
    print("Possible")
else:
    print("Impossible")
# Judge status: Wrong Answer
n,a,b = map(int,input().split())
n += 1
if a+2<=b and n>=a+2:
  x = n//(a+2)
  y = n%(a+2)
  ans = x*b+y
else:
  ans = n
print(ans)
# Judge status: Accepted
a = input()
print("vowel") if a in "aiueo" else print("consonant")
# Judge status: Accepted
import bisect

def solve():
  n = int(input())
  L = [int(i) for i in input().split()]
  L.sort()
  total = 0
  for s in range(n-2):
    for m in range(s+1, n-1):
      #二分探索モジュールbisect
      l = bisect.bisect_left(L,L[s]+L[m], 0, n)
      if l>m: total += l-m-1
  print(total)

  return 0

if __name__ == "__main__":
  solve()
# Judge status: Accepted

def resolve():
    import sys
    input = sys.stdin.readline

    a, b, c = [int(x) for x in input().rstrip().split(" ")]

    if (a * b * c) % 2 == 0:
        print(0)
        return

    a, b, c = sorted([a, b, c])

    print(a * b)



if __name__ == "__main__":
    resolve()
# Judge status: Accepted
import bisect
n = int(input())
a = list(map(int,input().split()))
q = int(input())
b = [0 for _ in range(q)]
c = [0 for _ in range(q)]
for i in range(q):
    b[i],c[i] = map(int,input().split())

cnt = [0 for _ in range(100001)]
for i in a:
    cnt[i] += 1

ans = sum(a)

for i in range(q):
    current = cnt[b[i]]*(c[i]-b[i])
    ans += current
    print(ans)
    cnt[c[i]] += cnt[b[i]]
    cnt[b[i]] = 0
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
ans=0
for i in range(int(n//2)):
  ans+=a[i]
for i in range(1,n-int(n//2)):
  ans+=a[i]
print(ans)
# Judge status: Accepted
N=int(input())
S=list(map(int,input().split()))
T=sorted(S)

if T[N//2]==T[(N-2)//2]:
  print("0")
else:
  print(T[N//2]-T[(N-2)//2])
# Judge status: Wrong Answer
a,b = map(int,input().split())
c = max(a,b)
if c > 12:
    print(a)
else:
    print(c)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
A.sort()
dic={}
for i in range(N):
    if A[i] not in dic:
        dic[A[i]]=0
    dic[A[i]]+=1
ban=set([])
res=0
for i in range(N):
    a=A[i]
    if a not in ban:
        if dic[A[i]]==1:
            res+=1
        for j in range(1,10**6//a+1):
            ban.add(a*j)

print(res)
# Judge status: Accepted
N = int(input())
C = [0, 0, 0, 0]
for i in range(N):
    S = input()
    if S == 'AC':
        C[0] += 1
    elif S == 'WA':
        C[1] += 1
    elif S == 'TLE':
        C[2] += 1
    elif S == 'RE':
        C[3] += 1

s = "AC x " + str(C[0]) + "\nWA x " + str(C[1]) + "\nTLE x " + str(C[2]) + "\nRE x " + str(C[3])
print(s)
# Judge status: Accepted
#https://atcoder.jp/contests/abc147/submissions/12994515を見た

import numpy as np
n = int(input())
a = np.array(input().split(),dtype=int)
mod = 10**9+7
m2 = [1 for i in range(60)]
for i in range(1,60):
    m2[i] = (m2[i-1]*2)%mod

ans = 0
for i in range(60):
    ni = np.count_nonzero(a&1)
    ans = (ans+ni*(n-ni)%mod*m2[i])%mod
    a >>= 1

print(ans)
# Judge status: Accepted
A,B,K = map(int, input().split())

print(A-K, B) if K <= A else print(0,0) if (A+B) <= K else print(0, A+B-K)
# Judge status: Accepted
A,B = map(int,input().split())

if A < 6:
    print(0)
elif 6 <= A and A <= 12:
    print(B//2)
else:
    print(B)
# Judge status: Wrong Answer
n, p = map(int, input().split())
a = [1 if i%2==0 else 0 for i in map(int,input().split())]
sum_a = sum(a)

if p==0:
    print(n*(n-1)//2-sum_a*(n-sum_a)+1)
else:
    print(sum_a*(n-sum_a))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
def solve(N,A):
    liss = []
    lis = []
    lis.append(A[0])
    a = A[0]
    for i in range(1,N):
        if len(lis)==1 or prev==0:
            prev = A[i]-a
        elif (A[i]-a)*prev<0:
            liss.append(lis)
            lis = []
        lis.append(A[i])
        a = A[i]
    liss.append(lis)
    ans = len(liss)
    return ans
print(solve(N,A))
# Judge status: Accepted
# ABC127
# A Ferris Wheel
a, b = map(int, input().split())
if a > 12:
    print(b)
    exit()
elif a < 6:
    print(0)
    exit()
else:
    print(b // 2)
    exit()
# Judge status: Accepted
n=int(input())
lst=[]
for i in range(n-1):
    c,s,f=map(int,input().split())
    lst.append([c,s,f])

for i in range(n-1):
    time=0
    for j in range(i,n-1):
        if time<=lst[j][1]:
            time=lst[j][1]+lst[j][0]
            continue
        if time%lst[j][2]==0:
            time+=lst[j][0]
            continue
        time+=(lst[j][2]-time%lst[j][2])+lst[j][0]
    print(time)
print(0)
# Judge status: Accepted
w=list(input())
W=list(set(w))
a=[]
for i in range(len(W)):
    a.append(w.count(W[i]))
b=[]
for i in range(len(a)):
    if a[i]%2==0:
        b.append('yes')
    else:
        b.append('no')
if 'no' in b:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
X = input()

res = 0
l = 0
for x in X:
    if x == 'S':
        l += 1
    elif l > 0:
        res += 1
        l -= 1
print(len(X)-2*res)
# Judge status: Accepted
import sys
input = sys.stdin.readline

n, k = map(int, input().split())
a = list(map(int, input().split()))

cnt, town = 0, 1
l, s = [], set()
while True:
    town = a[town - 1]
    cnt += 1
    if cnt == k:
        print(town)
        exit()
    if town in s:
        loop_start = town
        break
    l.append(town)
    s.add(town)


loop_cnt = l.index(loop_start)
loop = l[loop_cnt:]
print(loop[(k - loop_cnt) % len(loop) - 1])
# Judge status: Accepted
s = input()
if(s[0]==s[1])and(s[1]==s[2])and(s[2]==s[3]):
    print("No")
elif(s[0]==s[1])and(s[2]==s[3]):
    print("Yes")
elif(s[1]==s[2])and(s[0]==s[3]):
    print("Yes")
elif(s[1]==s[3])and(s[0]==s[2]):
    print("Yes")

else:
    print("No")
# Judge status: Accepted
a, b, c = map(int, input().split())
if a+b==c or a+c==b or b+c==a:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys
import itertools
a,b,c,d=[i for i in input()]
op=["+","-"]
for i in itertools.product(op,repeat=3):
  ev=a+i[0]+b+i[1]+c+i[2]+d
  if eval(ev)==7:
    print(ev+"=7")
    sys.exit()
# Judge status: Wrong Answer
a,b,c=[int(i) for i in input().split()]
d=a+b+c
if d>22:
  print('bust')
else:
  print('win')
# Judge status: Accepted
group = [[1, 3, 5, 7, 8, 10, 12], [4, 6, 9, 11], [2]]
x, y = map(int, input().split())
for i in range(3):
    if x in group[i] and y in group[i]:
        print("Yes")
        exit()
    
print("No")
# Judge status: Accepted
N = int(input())
ls = list(map(int,input().split()))
import collections
c = collections.Counter(ls)
unique_ls = list(reversed(sorted(([i[0] for i in c.items() if i[1] >= 2]))))

square_max = 0
rectan_a = 0
rectan_b =0

if len(unique_ls) >=2:
  if ls.count(unique_ls[0]) >=4:
    print(unique_ls[0]**2)
  else:
    print(unique_ls[0]*unique_ls[1])
elif len(unique_ls) ==1:
  if ls.count(unique_ls[0]) >=4:
    print(unique_ls[0]**2)
  else:
    print(0)
else:
  print(0)
# Judge status: Wrong Answer
N=int(input())
A=input()
kuro=0
shiro=0

count=-1

for i in range(N):
    if A[i:i+2]=="#.": 
        count=i
        break
for i in range(N):
    if A[i]=="#":
        kuro+=1

for i in range(count+1,N):
    if A[i]==".":
        shiro+=1
if count==-1:
    print(0)
else:
    print(min(shiro,kuro))
# Judge status: Accepted
import sys
a, b = [int(i) for i in sys.stdin.readline().split()]
if a == b:
    print(str(a) * b)
elif a < b:
    print(str(a) * b)
else:
    print(str(b) * a)
# Judge status: Accepted
X = int(input())

while True:
    if X == 2 or X % 2 != 0:
        for i in range(3, X):
            if X % i == 0:
                break
        else:
            break
    X += 1

print(X)
# Judge status: Accepted
n,x=map(int,input().split())
Len=[int(i) for i in input().split()]

ans=n+1
test=0
for i in range(n):
  test+=Len[i]
  if test<=x:
    continue
  else:
    ans=i+1
    break
    
print(ans)
# Judge status: Accepted
k, a, b = map(int, input().split())
if a+ 1 >= b:
    ans = k + 1
else:
    if k - a - 1 <  0:
        ans = k + 1
    else:
        n = (k - a - 1) // 2
        m = (k - a - 1) % 2
        ans = b + n * (b - a) + m


print(int(ans))
# Judge status: Accepted
import math
A = [int(input()) for _ in range(5)]
B = 10
ans = 0
for i in range(5):
  if 0 < A[i] % 10 < B:
    B = A[i] % 10
    ans = -10+B
for j in A:
  ans += math.ceil(j/10)*10
print(ans)
# Judge status: Accepted
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)+1):
    cnt = 0
    for j in range(len(T)):
        #print(i,j)
        if T[j] != S[j+i]:
            #print(T[j],S[j+i])
            cnt += 1
    ls.append(cnt)
#print(ls)
print(min(ls))
# Judge status: Accepted
N=int(input())
ans = 0
for a in range(1,1+N):
    if int((N-1)/a) == 0:
        continue
    else:
        ans += int((N-1)/a)
print(ans)
# Judge status: Accepted
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    n = int(input())
    a = list(map(int,input().split()))
    s = sum(a)
    ans = 0
    for i in range(n):
        s = s - a[i]
        ans = ans + a[i] * s
    print(ans % (10 ** 9 + 7))

    
if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
S = input()
T = ""
L = len(S)
for i in range(L):
    T += S[L-i-1]
print(T)
ans = 0
for i in range(L):
    if S[i] != T[i]:
        ans += 1
print(ans//2)
# Judge status: Wrong Answer
#!/usr/bin/env python

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

ans = 0 

for i in reversed(range(n)):
    if a[i]%b[i] == 0:
        continue
    else:
        ans += (a[i]//b[i]+1)*b[i]-a[i]
        if i!=0:
            a[i-1] += ans 

print(ans)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():

        s=input()
        n=len(s)
        if s=='keyence':
            return 'YES'
        else:
            for i in range(n):
                for j in range(i+1,n+1):
                    if s[:i]+s[j:]=='keyence':
                        return 'YES'
            return 'NO'
    print(main())
resolve()
# Judge status: Wrong Answer
n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 1
d = 0
for i in range(n):
    d += l[i]
    if d == x:
        cnt += 1
        break
    elif d > x:
        break

print(cnt)
# Judge status: Accepted
n=int(input())
strs=set()
for i in range(0,n):
    temp=input()
    strs.add(temp)
print(len(strs))
# Judge status: Accepted
import sys

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

for n in range(0, N+1):
  for m in range(0, M+1):
    if (N - n) * m + n * (M - m) == K:
      print("Yes")
      sys.exit()
print("No")
# Judge status: Accepted
s = len(input())
x = ''
for i in range(0, s):
  x += 'x'
print(x)
# Judge status: Wrong Answer
import sys

input = sys.stdin.readline


def S():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


n = I()
al = list(MI())


s = 0
for a in al:
    s ^= a

ans = []
for a in al:
    ans.append(str(s ^ a))

print(" ".join(ans[::-1]))
# Judge status: Accepted
x = int(input())
b = []
for i in range(2,32):
    for j in range(2, 10):
        b.append(i**j)
b.sort()
ans = 1
for i in b:
    if i <= x:
        ans = i
    else:
        break
print(ans)
# Judge status: Wrong Answer
n,m=map(int,input().split())
ans=[0]*n

for _ in range(m):
  s,c=map(int,input().split())
  ans[s-1]=c
if n>1 and ans[0]==0:
  print(-1)
  exit()
elif n==1 and ans[0]==0:
  print(0)
  exit()
else:
  for i in ans:
    print(i,end="")
# Judge status: Wrong Answer
a,b,c,k = map(int,input().split())
if k % 2 == 0:
  if abs(a-b) >= 10*8:
    print('Unfair')
  else:
    print(a-b)
else:
  if abs(b-a) >= 10**8:
    print('Unfair')
  else:
    print(b-a)
# Judge status: Accepted
import numpy as np
n,w=map(int,input().split())
 
dp=np.zeros(w+1,np.int64)
for i in range(n):
    w,v = map(int,input().split())
    dp[w:] = np.maximum(dp[w:], dp[:-w] + v)
    
print(np.max(dp))
# Judge status: Accepted
# 1回目から順に ABC001,ABC002...
# 1000 回目から 1998回目のコンテストを順に ABD001,ABD002...
# 1以上 1998以下の整数 N が与えられるので、
# N回目のコンテストの名前の最初の 3 文字を出力

N = int(input())

if N < 1000:
    print('ABC')
else:
    print('ABD')
# Judge status: Accepted
import sys

def o(c): return ord(c) - ord('a')

s, t = sys.stdin.read().split()

def main():
    g1 = [set() for _ in range(26)]
    g2 = [set() for _ in range(26)]
    for i in range(len(s)):
        a = o(s[i]); b = o(t[i])
        g1[a].add(b); g2[b].add(a)

    for i in range(26):
        if len(g1[i]) >= 2 or len(g2[i]) >= 2:
            print('No')
            return
    print('Yes')

if __name__ ==  '__main__':
    main()
# Judge status: Accepted
S1 = input()
S2 = input()
if S1[::-1] == S2:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
s = list(s)
s[0] = 'a'
f = 0
for i in range(2,len(s)-1):
    if s[i] == "C":
        if f:
            ans = "WA"
        else:
            f = 1
            s[i] = "c"

if not f:
    ans = "WA"
for si in s:
    if si not in "abcdefghijklmnopqrstuvwxyz":
        print(si, 1)
        ans = "WA"
print(ans)
# Judge status: Accepted
n = int(input())
rslt = 0

for i in range(1, n+1):
  if i % 3 == 0 or i % 5 == 0:
    continue
  else:
    rslt += i

print(rslt)
# Judge status: Wrong Answer
s= input()+"x"

ans = ""

for i in range(len(s)-1):
    if s[i]!="B" and s[i+1]!="B":
        ans += s[i]
    else:
        continue
print(ans)
# Judge status: Accepted
import sys, math
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    N, D = mi()
    X, Y = i2(N)
    print(sum(1 for i in range(N) if X[i]**2+Y[i]**2 <= D**2))

if __name__ == '__main__':
    main()
# Judge status: Accepted
import math
from collections import Counter

N = int(input())

max_itr = math.ceil(math.sqrt(N))

factors = []
while True:
    for i in range(2, max_itr):
        if N%i == 0:
            N = N // i
            factors.append(i)
            break
    else:
        if N != 1:
            factors.append(N)
        break

c = Counter(factors)
f = lambda x: math.floor((math.sqrt(8*x+1) - 1)/2)
print(sum(f(v) for v in c.values()))
# Judge status: Accepted
def resolve():
    S = input()
    cnt = 0
    pre = ""
    tmp = ""
    for s in S:
        tmp += s
        if tmp != pre:
            pre = tmp
            tmp = ""
            cnt += 1
    print(cnt)


resolve()
# Judge status: Accepted
c = input()
if c == 'a' or c =='i' or c == 'u' or c == 'e' or c =='o':
  print('vowel')
else:
  print('consonant')
# Judge status: Wrong Answer
import numpy as np
import math

def cmb(n, r, mod):
    n_1 = 1
    n_2 = 1

    r = min(r, n-r)
    for i in range(1, r+1):
        n_1 = n_1 * i % mod
        n_2 = n_2 * (n - i + 1) % mod

    return (n_2 * pow(n_1, mod - 2, mod))%mod

mod = 10**9+7

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

x = (2*Y - X) // 3
y = (2*X - Y) // 3

if x < 0 or y < 0:
    print(0)
else:
    print(cmb(int(x+y), int(x), mod))
# Judge status: Wrong Answer
from math import sqrt
 
a, b = map(str, input().split())
f = int(a+b)
#print(f)

for i in range(1, 101):
  if sqrt(f) / i == i:
    print('Yes')
    exit()
print('No')
# Judge status: Wrong Answer
from sys import stdin
from math import ceil, floor
n, a, b = [int(x) for x in stdin.readline().rstrip().split()]
s = list(stdin.readline().rstrip())
c = a + b
d = 0
e = 0
for i in range(n):
    if d < c and s[i] == "a":
        print("YES")
        d += 1
    elif d < c and e < b and s[i] == "b":
        print("YES")
        d += 1
        e += 1
    else:
        print("NO")
# Judge status: Accepted
import queue
q = queue.Queue()
for i in range(1, 10): q.put(i)

K = int(input())
t = 0
ans = 0

while t < K:
  t += 1
  ans = q.get()
  p = int(str(ans)[-1])
  for i in range(-1, 2):
    if 0 <= p+i < 10: q.put(int(str(ans) + str(p+i)))

print(ans)
# Judge status: Accepted
from collections import Counter

n, k = map(int, input().split())
A = list(map(int, input().split()))

cnt_A = sorted(Counter(A).values())

ans = 0
if len(cnt_A) <= k:
    print(ans)
else:
    for i in range(len(cnt_A) - k):
        ans += cnt_A[i]
    print(ans)
# Judge status: Accepted
N = int(input())

for i in range(1,N+1):
    if i*(i+1) >= 2*N:
        n = i
        break

for j in range(1,n+1):
    if j == ((i*(i+1)//2)-N):
        continue
    print(j)
# Judge status: Accepted

def main():
    h, a = map(int, input().split())
    if h % a == 0:
        print(h // a)
    else:
        print(h // a + 1)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import string

print(type(string.ascii_lowercase))
input = input()
alphabets = string.ascii_lowercase

print(alphabets.index(input))
i = alphabets.index(input)
ans = alphabets[i + 1]
  
print(ans)
# Judge status: Accepted
a,b = map(int, input().split())
print("Yes" if a == b else "No")
# Judge status: Accepted
def digit_sum2(num):
    total = 0
    for digit in str(num):
        total += int(digit)
    return total
    
n = input()
l = len(n)
n = int(n)

print(max(digit_sum2(n), n // (10 ** (l-1)) - 1 + 9 * (l-1)))
# Judge status: Accepted
s = input()
if s == 'ABC':
  print("ARC")
else:
  print("ABC")
# Judge status: Accepted
n = int(input())
tmp = 0
num_list = []
for i in range(1,10**9):
    if tmp < 10**9:
        tmp += i
        num_list.append(tmp)
    else:
        break
for i in range(len(num_list)):
    if num_list[i] >= n:
        print(i+1)
        break
# Judge status: Wrong Answer
N = int(input())
S = list(input())

a = [0]*N

x = 0

for i in range(N):
  if S[i] == 'I':
    x += 1
    a[i] = x
  else:
    x -= 1
    a[i] = x
    
print(max(a))
# Judge status: Wrong Answer
s=input()
result=True
total=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            result=False
            break
    elif 2<=i<=len(s)-2:
        if s[i]=="C":
            total+=1
        if total!=1:
            result=False
            break
    else:
        if s[i].islower()==False:
            result=False
            break
if result==False:
    print("WA")
else:
    print("AC")
# Judge status: Accepted
n=int(input())
s=input()
ans=''
for i in s:
    if ord(i)+n>ord('Z'):
        ans+=chr(ord(i)+n-26)
    else:
        ans+=chr(ord(i)+n)
print(ans)
# Judge status: Wrong Answer
S = input()

N = len(S)
Aflag = 0
Zflag = 0
for i in range(N):
    if Aflag == 0 and S[i] == 'A':
        Aflag = i
    elif S[i] == 'Z':
        Zflag = i

print(Zflag-Aflag+1)
# Judge status: Accepted
a, b = map(int, input().split())

n = b - a - 1

print(n * (n + 1) // 2 - a)
# Judge status: Wrong Answer
import math

n,k = map(int,input().split())

#全部選ぶときの和の個数は0+1+2+ ~ +nの1+(n+1)n/2個

#k個は好きな選び方ができる。
#k個以上の数を選ぶときに「絶対に満たせない和の値」を考える。
#その数は10**100 + 10**100+1 + ... + 10*100+k-1 -1 の(k-1)k/2である。

result_before_division = 1+(n+1)*n/2 - (k-1)*k/2

result = result_before_division % (10**9 + 7)

print(result)
# Judge status: Accepted
n = int(input())
abc = [ list(map(int,input().split())) for _ in range(n) ]

dp = [ [0,0,0] for _ in range(n) ]

dp[0] = abc[0]

for i in range(1,n):
    # print("i={}".format(i))
    dp[i][0] = max(dp[i-1][1]+abc[i][0],dp[i-1][2]+abc[i][0])
    dp[i][1] = max(dp[i-1][0]+abc[i][1],dp[i-1][2]+abc[i][1])
    dp[i][2] = max(dp[i-1][0]+abc[i][2],dp[i-1][1]+abc[i][2])

print(max(dp[n-1]))
# Judge status: Wrong Answer
i = int("".join(input().split()))
print(i)
# Judge status: Accepted
S = [list(map(int, i.split())) for i in input()]

num = []
for i in range(len(S)-2):
    aa = []
    aa.append(S[i])
    aa.append(S[i+1])
    aa.append(S[i+2])
    aa = sum(aa, [])
    aa = "".join(list(map(str, aa)))
    test = abs(int(aa) - 753)
    num.append(test)

minimum = min(num)
print(minimum)
# Judge status: Accepted
import sys
from bisect import bisect_left, insort_right

input = sys.stdin.readline


def main():
    N = int(input())
    A = [0] * N
    for i in range(N):
        A[i] = int(input())

    colors = []
    for a in A:
        idx = bisect_left(colors, a)
        if idx != 0:
            colors.pop(idx - 1)
        insort_right(colors, a)

    ans = len(colors)
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Accepted
N = int(input())
print(int(N * (N + 1) / 2))
# Judge status: Wrong Answer
from sys import stdin

n, a, b = [int(x) for x in stdin.readline().strip().split()]
s = stdin.readline()

a = a + b
all_num = 0
oversea_num = 0

for i, t in enumerate(s):
  if t == 'a' and all_num < a:
    print('Yes')
    all_num += 1
  elif t == 'b' and  oversea_num < b and all_num < a:
    print('Yes')
    all_num += 1
    oversea_num += 1
  else:
    print('No')
# Judge status: Accepted
from string import ascii_lowercase as abc
s = input()
if set(abc) == set(s):
    print('None')
else:
    print(sorted(list(set(abc)-set(s)))[0])