Harryxun/stf_run huggingface dataset:
mod=10**9+7
n,m=map(int,input().split())
s=list(map(int,input().split()))
t=list(map(int,input().split()))
dp1=[1]*(m+1)
dp2=[1]*(m+1)
for i in range(n):
  for j in range(m):
    if s[i]==t[i]:dp1[j+1]=dp2[j+1]+dp1[j]
    else:dp1[j+1]=dp2[j+1]+dp1[j]-dp2[j]
    dp1[j+1]%=mod
  dp2=dp1
  dp1=[1]*(m+1)
print(dp2[-1])

### FIXED CODE ###

mod=10**9+7
n,m=map(int,input().split())
s=list(map(int,input().split()))
t=list(map(int,input().split()))
dp=[(m+1)*[1]for _ in range(n+1)]
for i in range(n):
  for j in range(m):
    if s[i]==t[j]:dp[i+1][j+1]=dp[i][j+1]+dp[i+1][j]
    else:dp[i+1][j+1]=dp[i][j+1]+dp[i+1][j]-dp[i][j]
    dp[i+1][j+1]%=mod
print(dp[-1][-1])
ans = [-1] * n
for i in range(m):
    if ans[sc[i][0]-1] == -1 or ans[sc[i][0]-1] == sc[i][1]:
        ans[sc[i][0]-1] = sc[i][1]
    else:
        print(-1)
        exit()
if n == 1 and ans[0] != -1:
    print(ans[0])
    exit()
if ans[0] == 0:
    print(-1)
    exit()
if n == 2 and ans[0] != -1 and ans[1] != -1:
    map_ans = map(str, ans)
    print("".join(map_ans))
elif n == 2 and ans == [-1, -1]:
    print(-1)
elif n == 2:
    ans[0] = 1
    map_ans = map(str, ans)
    print("".join(map_ans))
elif n == 3 and ans == [-1, -1, -1]:
    print(-1)
elif n == 3:
    for i in range(3):
        if i == 0 and ans[i] == -1:
            ans[i] = 1
        if ans[i] == -1:
            ans[i] = 0
    map_ans = map(str, ans)
    print("".join(map_ans))



### FIXED CODE ###

n, m = map(int,input().split())
sc = []
for i in range(m):
    s,c = map(int,input().split())
    sc.append([s,c])
for i in range(1000):
    if len(str(i)) == n:
        flag = True
        for j in range(m):
            if int(str(i)[sc[j][0] - 1]) != sc[j][1]:
                flag = False
        if flag:
            print(i)
            exit()
        else:
            continue
print(-1)
n, w = map(int, input().split())
a = [[int(i) for i in input().split(" ")] for j in range(n)]
dp = [[0]*(w+1) for i in range(n+1)]
for i in range(1, n+1):
    w_, v_ = a[i-1]
    for j in range(1, w+1):
        if j < w_:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = max(dp[i-1][j-w_]+v_, dp[i-1][j])
print(dp[n][w])

### FIXED CODE ###

n, w = map(int, input().split())
a = [[int(i) for i in input().split(" ")] for j in range(n)]
dp = [[0]+[float("inf")]*(10**5) for i in range(n+1)]
for i in range(1, n+1):
    w_, v_ = a[i-1]
    for j in range(1, 10**5+1):
        if j < v_:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = min(dp[i-1][j-v_]+w_, dp[i-1][j])
for i in range(10**5, -1, -1):
    if dp[n][i]<=w:
        print(i)
        break
S = input()

partial = ""

conditions = ["A","T","G","C"]

conlist = []

con = 0

for i in range(0,len(S)):
	if S[i] in conditions:
		for j in range(0,i):
			if S[j] in conditions:
				con +=1
			if (S[j] not in conditions) or j == i:
				conlist.append(con)
				con = 0
				

print(max(conlist))

### FIXED CODE ###

S = input()

partial = ""

conditions = ["A","T","G","C"]

conlist = []

con = 0

for i in range(0,len(S)):
	if S[i] in conditions:
		for j in range(0,i+1):
			if S[j] in conditions:
				con +=1
			if (S[j] not in conditions) or j == i:
				conlist.append(con)
				con = 0
				

if len(conlist) > 0:
	print(max(conlist))
else:print(0)
n = int(input())
a = list(int(x) for x in input().split())
x = 0

a.reverse()
for i in range(n):
    if a[0] - a[1] == 0:
        print("NO")
        x = 1
        break
    a.pop(0)

if x == 0:
    print("YES")


### FIXED CODE ###

n = int(input())
a = list(int(x) for x in input().split())
x = 0
 
a.sort()
for i in range(n-1):
    if a[-1] - a[-2] == 0:
        print("NO")
        x = 1
        break
    a.pop()
 
if x == 0:
    print("YES")
tmp = input()
fi = int(tmp.split(" ")[0])
se = int(tmp.split(" ")[1])
k = abs(fi + se)/2
mod = abs(fi + se) % 2
if mod == 1:
  print("IMPOSSIBLE")
  else:
  print(k)

### FIXED CODE ###

tmp = input()
fi = int(tmp.split(" ")[0])
se = int(tmp.split(" ")[1])
k = int(abs(fi + se)/2)
mod = abs(fi + se) % 2
if mod == 1:
  print("IMPOSSIBLE")
else:
  print(k)
N = int(input())
S = input()
ans = 0
for i in range(N-2):
  if s[i:i+3] == 'ABC':
    ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
s = input()
ans = 0
for i in range(n-2):
  if s[i:i+3] == 'ABC':
    ans += 1
print(ans)
N=int(input())

NODES={}
for i in range(N-1):
    a,b,c=map(int,input().split())
    if not a in NODES:
        NODES[a] = []
    if not b in NODES:
        NODES[b] = []
    NODES[a].append((b, c))
    NODES[b].append((a, c))

Q,K=map(int,input().split())
MP=[-1]*(N+1)
MP[K]=0
def dfs(k):
    for i, c in NODES[k]:
        if MP[i] == -1:
            MP[i] = MP[k] + c
            dfs(i)

dfs(K)
# print(MP)
for l,r in [tuple(map(int,input().split())) for _ in range(Q)]:
    print(MP[l]+MP[r])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
N=int(input())

NODES={}
for i in range(N-1):
    a,b,c=map(int,input().split())
    if not a in NODES: NODES[a] = []
    if not b in NODES: NODES[b] = []
    NODES[a].append((b, c))
    NODES[b].append((a, c))

Q,K=map(int,input().split())
MP=[-1]*(N+1)
MP[K]=0
def dfs(k):
    for i, c in NODES[k]:
        if MP[i] == -1:
            MP[i] = MP[k] + c
            dfs(i)

dfs(K)
# print(MP)
for l,r in [tuple(map(int,input().split())) for _ in range(Q)]:
    print(MP[l]+MP[r])
N = _
V = list(map(int, input().split()))
C = list(map(int, input().split()))

print(sum(map(lambda p: max(0, p[0] - p[1]), zip(V, C))))


### FIXED CODE ###

_ = input()
V = list(map(int, input().split()))
C = list(map(int, input().split()))

print(sum(map(lambda p: max(0, p[0] - p[1]), zip(V, C))))
num1 = int(input())
num2 = int(input())
num3 = num1 + num2
num4 = num1 - num2
num5 = num1 * num2
num6 = [num3, num4, num5]
print(max(num6))


### FIXED CODE ###

num1,num2 = map(int,input().split())
 
num3 = num1 + num2
num4 = num1 - num2
num5 = num1 * num2
num6 = [num3, num4, num5]
 
print(max(num6))
a,b,c = map(int, input().spit())
if b//a < c:
  print(b//a)
else:
  print(c)

### FIXED CODE ###

a,b,c = map(int, input().split())
if b//a < c:
  print(b//a)
else:
  print(c)
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == s:
  print(1)
else:
  print(l[K-1])

### FIXED CODE ###

S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)
if X => 30:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

X = input()
X = int(X)

if X >= 30:
  print('Yes')
else:
  print('No')
import collections
n = int(input())
alist = list(map(int,input().split()))
adic = collections.Counter(alist)
A = [0,0]
for i in adic:
  if adic[i] > 1:
    A.append(i)
  if adic[i] > 3:
    A.append(i)
sortedA = sorted(A)
print(sorted[-1]*sorted[-2])

### FIXED CODE ###

import collections
n = int(input())
alist = list(map(int,input().split()))
adic = collections.Counter(alist)
A = [0,0]
for i in adic:
  if adic[i] > 1:
    A.append(i)
  if adic[i] > 3:
    A.append(i)
sortedA = sorted(A)
print(sortedA[-1]*sortedA[-2])
n, k = map(int, input().split())
x = n
i = 0
c = max(n, k) / min(n, k)
if k == 1:
    print("0")
else:
    while i <= c:
        x = abs(x - k)
        i += 1
print(min(n, x))


### FIXED CODE ###

n, k = map(int, input().split())
a = n % k
b = k - a
print(min(a, b))
import sys
input = sys.stdin.readline
import numpy as np

def print_sub(A, Ones):
  A = np.array(A)
  Ones = np.array([1]*(n-1))
  A = A -Ones
  print(n-1 -len(np.nonzero(A)[0]))
  return print_sub(A, Ones)

n= int(input())
A = [int(a) for a in input().split()]

print_sub(A, Ones)
    
print("0")


### FIXED CODE ###

import sys
input = sys.stdin.readline

import math

p = math.pi

r = int(input())
print(r*2*p)
# -*- coding: utf-8 -*-
"""
Created on Sun Oct  7 22:06:12 2018
ABC073D
@author: maezawa
"""
import itertools as itr
import sys
input = sys.stdin.readline

n, m, r = list(map(int, input().split()))
rarray = list(map(int, input().split()))
adjmatrix = [[10**10]*(n+1) for _ in range(n+1)]
for i in range(1,n+1):
    adjmatrix[i][i] = 0
    
for i in range(m):
    a, b, c = list(map(int, input().split()))
    if adjmatrix[a][b] > c:
        adjmatrix[a][b] = c
        adjmatrix[b][a] = c

#print(abc)

# Warshall-Floyd Algorithm
for k in range(1,n+1):
    for i in range(1,n+1):
        for j in range(j+1,n+1):
            adjmatrix[i][j] = min([adjmatrix[i][j],
                      adjmatrix[i][k] + adjmatrix[k][j]])
            adjmatrix[j][i] = adjmatrix[i][j]
        
#print(*adjmatrix, sep='\n')
    
# search for ri to rj
mincnt = 10*10
for route in itr.product(rarray,repeat=len(rarray)):
    cnt = 0
    for i in range(len(rarray)-1):
        cnt += adjmatrix[route[i]][route[i+1]]
    if cnt < mincnt:
        mincnt = cnt

print(mincnt)
        
        

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Mon Oct  8 10:17:39 2018

@author: maezawa
"""

import math
from itertools import permutations

#フロイド・ワーシャル
def warshall_floyd(glath):
	
	for k in range(len(glath)):
		for i in range(len(glath)):
			for j in range(len(glath[i])):
				if glath[i][j] > glath[i][k] + glath[k][j]:
                                   glath[i][j] = glath[i][k] + glath[k][j]
                                   glath[j][i] = glath[i][k] + glath[k][j]				
	return glath

N, M ,R= [int(x) for x in str(input()).split()]  #グラフの大きさ 
r=[int(x) for x in str(input()).split()]
graph=[[float("inf")]*N for i in range(N)]


for i in range(M):
	a,b,c=[int(x) for x in str(input()).split()]
	#if a in r and b in r:
	graph[a-1][b-1]=c
	graph[b-1][a-1]=c

#all_cost=warshall_floyd(select_graph)
all_cost=warshall_floyd(graph)


max_count=float("inf")
for i in permutations(r):
        cost=0
        for j in range(len(i)-1):                
                cost+= all_cost[i[j]-1][i[j+1]-1]       
        max_count=min(max_count,cost)

print(max_count)
a,b = list(map(int,input().split()))
if a == 0 or b == 0:
  print(0)
elif a * b % 2 = 0:
  print(a * b // 2)
else:
  print(a * b // 2 + 1)


### FIXED CODE ###

a,b = list(map(int,input().split()))
if a == 1 or b == 1:
  print(1)
elif a * b % 2 == 0:
  print(a * b // 2)
else:
  print(a * b // 2 + 1)
A,B=map(int,input(),split())
print((B-1)//A+1)

### FIXED CODE ###

A,B=map(int,input().split())
if (B-1)%(A-1)==0:
  print((B-1)//(A-1))
else:
  print((B-1)//(A-1)+1)
S = list(input())
Q = int(input())
 
for q in range(1, Q + 1):
    inp = input().split(" ")
    if (int(inp[0]) == 1):
        S.reverse()
    else:
        if (int(inp[1]) == 1):
            S.insert(0, inp[2])
        elif (int(inp[1]) == 2):
            S.append(inp[2])
 
print("".join(S))

### FIXED CODE ###

S = input()
a = 0
b = 0
for s in S:
    if s == "A":
        a += 1
    elif s == "B":
        b += 1
if a == 0 or b == 0:
    print("No")
else:
    print("Yes")
While True:
    (a, op, b) = input().split()
    a =int(a)
    b =int(b)

    if op == '?':
        break

    elif op == '+':
        print(a + b)

    elif op == '-':
        print(a - b)

    elif op == '*':
        print(a * b)

    elif op == '/':
        print(a // b)

### FIXED CODE ###

while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

    if op == '?':
        break

    if op == '+':
        print(a + b)

    if op == '-':
        print(a - b)

    if op == '*':
        i = a * b
        print(a * b)

    if op == '/':
        print(a // b)
# -*- coding: utf-8 -*-

import sys


def prime(n):
    s = [i for i in range(2,n+1)]
    p = []
    while s[0] < n**0.5:
        p.append(s[0])
        for ss in s:
            if ss % p[-1] == 0:
                s.remove(ss)
    p.extend(s)
    return p

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()

### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys


def eratosthenes_sieve(n):
    table = [0]*(n + 1)
    prime_list = []
    
    for i in range(2, n + 1):
        if table[i] == 0:
            prime_list.append(i)
            for j in range(i + i, n + 1, i):
                table[j] = 1
    return prime_list


def prime(n):
    return eratosthenes_sieve(n)

def main():
    inp = [int(n) for n in sys.stdin]
    for n in inp:
        n_pn = len(prime(n))
        print(n_pn)

if __name__ == '__main__':
    main()
a,b= map(int, input(),split())
print(a*b,2*(a+b))

### FIXED CODE ###

a,b= map(int, input().split())
print(a*b,2*(a+b))
import math
answers=[]
X=int(input())
for a in range(-math.ceil(X**0.2),math.ceil(X**0.2)+1):
    for b in range(-math.ceil(X**0.2),math.ceil(X**0.2)+1):
        if a**5-b**5==X:
            answers.append([a,b])
print(answers[0][0],answers[0][1])


### FIXED CODE ###

import math
X=int(input())
a=pow(10,9)
c=math.ceil(a**0.3)
answers=[]
for a in range(-c,c+1):
    for b in range(-c,c+1):
        if pow(a,5)-pow(b,5)==X:
            answers.append(a)
            answers.append(b)
            break
print(answers[0],answers[1])
import math

#グラフの作成   
def make_list(V,E):
 
    edges = []
    path=[[0]*E for i in range(V) ]   #ルート作成に必要になる
    
    for i in range(V):
        a = list(map(int, input().split()))
        for j in range(len(a)):
            #print("j",j)
            path[i][j]=i
            if j!= i and a[j]==0:
                a[j]=30000
                path[i][j]=-3000
	
        edges.append((a))    #  有効辺グラフ
	

   
     
    return edges ,path


def mainasu_sycle(dist):   #負のサイクルがあるか確認する    第一引数: 重みを含む配列  実装を確認していない
    
    for i in range (0,len(dist)):
       if dist[i][i] != 0:
        print ("Negative cycle at : ", i+1)




#最短経路をたどる
def ConstructPath(p, i, j):
    i,j = int(i), int(j)
    print("i,j:",i,j)
    if(i==j):
      print (i,)
    elif(p[i][j] == -30000):
      print (i,'-',j)
    else:
      ConstructPath(p, i, p[i][j]);
      print(j,)




#フロイド・ワーシャル
def warshall_floyd(glath,path):
	
	for k in range(len(glath)):
		for i in range(len(glath)):
			for j in range(len(glath[i])):
				if glath[i][j] > glath[i][k] + glath[k][j]:
                                   glath[i][j] = glath[i][k] + glath[k][j]
                                   path[i][j] = path[k][j]
				#glath[i][j]= min(int(glath[i][j]),int(glath[i][k])+int(glath[k][j]))
				
	return glath,path






if __name__ == "__main__":
    H, W = map(int, input().split())  #グラフの大きさ 

    cost_graph,graph=make_list(10,10)
    wall ,wall_graph= make_list(H,W)
   

    un_label=[]
    for i in wall:
       for j in i: 
            if j !=-1 and j!=1:
                 un_label.append(j)
    cost=0
 
    all_cost,all_graph=warshall_floyd(cost_graph,graph)
    
   

    for i in un_label:
        cost+=all_cost[i][1]

    print(cost)

### FIXED CODE ###

import math

#グラフの作成   
def make_list(V,E):
 
    edges = []
    path=[[0]*E for i in range(V) ]   #ルート作成に必要になる
    
    for i in range(V):
        a=[int(x) for x in str(input()).split()]
        for j in range(len(a)):
            #print("j",j)
            path[i][j]=i
           # if j!= i and a[j]==0:
                #a[j]=2000
                #path[i][j]=-2000
	
        edges.append((a))    #  有効辺グラフ
	

   
     
    return edges ,path


#フロイド・ワーシャル
def warshall_floyd(glath,path):
	
	for k in range(len(glath)):
		for i in range(len(glath)):
			for j in range(len(glath[i])):
				if glath[i][j] > glath[i][k] + glath[k][j]:
                                   glath[i][j] = glath[i][k] + glath[k][j]
                                   path[i][j] = path[k][j]
				#glath[i][j]= min(int(glath[i][j]),int(glath[i][k])+int(glath[k][j]))
				
	return glath,path





H, W = [int(x) for x in str(input()).split()]  #グラフの大きさ 

cost_graph,graph=make_list(10,10)
wall ,wall_graph= make_list(H,W)
    #print(cost_graph)

un_label=[]
for i in wall:
   for j in i: 
            if j !=-1 and j!=1:
                 un_label.append(j)
cost=0
 
all_cost,all_graph=warshall_floyd(cost_graph,graph)
    
   

for i in un_label:
        cost+=all_cost[i][1]

print(cost)
x,y=input().split();print("=><"[(x>y)-(x<y)])

### FIXED CODE ###

s=input()
t=input()
print("YES"if s==t[::-1] else "NO")
N, X, M = map(int, input().split())
if X == 0:
    print(0)
    exit()
check = [0]*(M+1)
check[X] += 1
A = X
last_count = 0
while True:
    A = (A**2)%M
    if check[A] != 0:
        last_count = sum(check)
        target_value = A
        break
    check[A] += 1
A2 = X
first_count = 0
while True:
    first_count += 1
    A2 = (A2**2)%M
    if A2 == target_value:
        break

roop_count = last_count-first_count
A3 = target_value
mass = A3
for i in range(roop_count-1):
    A3 = (A3**2)%M
    mass += A3
print(first_count,last_count,target_value,mass)
if roop_count == 0:
    pass

ans = X
A = X
for i in range(min(N,first_count)-1):
    A = (A**2)%M
    ans += A
if N > first_count:
    ans += ((N-first_count)//roop_count)*mass
    A4 = target_value
    if (N-first_count)%roop_count >= 1:
        ans += A4
    for i in range(((N-first_count)%roop_count)-1):
        A4 = (A4**2)%M
        ans += A4

print(ans)

### FIXED CODE ###

N, X, M = map(int, input().split())
if X <= 1:
    print(X*N)
    exit()
check = [0]*(M+1)
check[X] += 1
A = X
last_count = 0
while True:
    A = (A**2)%M
    if check[A] != 0:
        last_count = sum(check)
        target_value = A
        break
    check[A] += 1
A2 = X
first_count = 0
while A2 != target_value:
    first_count += 1
    A2 = (A2**2)%M

roop_count = last_count-first_count

A3 = target_value
mass = A3
for i in range(roop_count-1):
    A3 = (A3**2)%M
    mass += A3
if roop_count == 0:
    print(N*X)
    exit()
if first_count != 0:
    ans = X
    A = X
    for i in range(min(N,first_count)-1):
        A = (A**2)%M
        ans += A
else:
    ans = 0
if N > first_count:
    ans += ((N-first_count)//roop_count)*mass
    A4 = target_value
    if (N-first_count)%roop_count >= 1:
        ans += A4
    for i in range(((N-first_count)%roop_count)-1):
        A4 = (A4**2)%M
        ans += A4
print(ans)
n = int(input)
s = input().split()
if "Y" in s:
  print("Four")
else:
  print("Three")

### FIXED CODE ###

n = int(input())
s = input().split()
if "Y" in s:
  print("Four")
else:
  print("Three")
x = int(input())

if x == 3 or x == 5 or x == 7:
    print "YES"

else:
    print "NO"

### FIXED CODE ###

x = int(input())

if x == 3 or x == 5 or x == 7:
    print ("YES")

else:
    print ("NO")
a,b=map(int,input().split)
print("Yay!" if (a<=8 and b<=8) else ":(")

### FIXED CODE ###

a,b=map(int,input().split())
print("Yay!" if a<=8 and b<=8 else ":(")
n,k = map(int,input().split())
lst = list(map(int,input().split()))
e,o = 0,0
for i in range(n):
    if lst[i]%2==0:
        e += 1
    else:
        o += 1

if o==0:
    if p==0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))

### FIXED CODE ###

n,k = map(int,input().split())
lst = list(map(int,input().split()))
e,o = 0,0
for i in range(n):
    if lst[i]%2==0:
        e += 1
    else:
        o += 1

if o==0:
    if k==0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))
import sys
pos=input()
pos=pos.split()
N=int(pos[0])
P=int(pos[1])
T=int(pos[2])
point={P}*N

for i in range(0,T):
    c=input()
    point={p-1 for p in point}
    point{int(c)-1}+=1

for i in range(0,N):
    if(point{i}>0):
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

pos=input()
pos=pos.split()
N=int(pos[0])
P=int(pos[1])
T=int(pos[2])
point=[0]*N

for i in range(0,T):
    c=input()
    point[int(c)-1]+=1
point=[P-T+d for d in point]
for i in range(0,N):
    if(point[i]>0):
        print('Yes')
    else:
        print('No')
from fractions import gcd
from functools import reduce

N,X=map(int,input().split())
ls=[abs(int(input())-X) for _ in range(N)]

print(reduce(gcd,ls))


### FIXED CODE ###

from fractions import gcd
from functools import reduce

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

def int_X(x):
    return abs(int(x)-X)

ls=list(map(int_X,input().split()))

print(reduce(gcd,ls))
x = int(input(x))
if x == 1:
  print(0)
else:
  print(1)

### FIXED CODE ###

x = int(input())
if x == 0:
  print(1)
else:
  print(0)
import sys

def solve(N, T, A, ls_H):
    dosi = []
    titen = []
    titen1 = []
    ti = 10**5//1
    for x in list1 :
        do = T - x * 0.006
        dosi.append(do)
    #print(dosi)
    
    for y in dosi :
        ti = A - y
        titen.append(ti)
    #print(titen)
    
    for z in titen :
        titen1.append(abs(z))
    #print(titen1)
    
    for i in titen1 :
        if ti > i :
            ti = i
    #print(ti)
    return titen1.index(ti) + 1

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

### FIXED CODE ###

import sys
 
def solve(N, T, A, ls_H):
    dosi = []
    titen = []
    titen1 = []
    ti = 10**5//1
    for x in ls_H :
        do = T - x * 0.006
        dosi.append(do)
    #print(dosi)
    
    for y in dosi :
        til = A - y
        titen.append(til)
    #print(titen)
    
    for z in titen :
        titen1.append(abs(z))
    #print(titen1)
    
    for i in titen1 :
        if ti > i :
            ti = i
    #print(ti)
    return titen1.index(ti) + 1
 
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)
 
def main():
    print(solve(*readQuestion()))
 # Uncomment before submission
main()
N=int(input())
H=list(map(int,input().split(" ")))
D=[0]*N
M=[0]*N

D[N-1]=H[N-1]
M[N-1]=1
for i in reversed(range(N-1)):
  if H[i] > H[i-1]:
    D[i]=D[i-1]+1
  else:
    D[i]=1
  M[i]=max(D[i],M[i-1])
return M[0]

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split(" ")))
D=[0]*N
M=[0]*N
D[N-1]=0
M[N-1]=0
for i in reversed(range(N-1)):  
  if H[i] >= H[i+1]:
    D[i]=D[i+1]+1
  else:
    D[i]=0
  M[i]=max(D[i],M[i+1])
#print(H)
#print(D)
#print(M)
print(M[0])
import sys
sys.setrecursionlimit(2147483647)
N=int(input())
A=[26,702,18278,475254,12356630,321272406,8353082582,217180147158,5646683826134,146813779479510,3817158266467286,95428956661682176]
B=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
a=0
for x in range(12):
  if N<=A[x]:
    a=x
    break
for y in range(a):
  b=N//(26**(a-y))
  print(B[b-1],end="")
  N=N-b*(26**(a-y))
print(B[N-1])
  

### FIXED CODE ###

'''
Created on 2020/08/31

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  ans=""
  while N:
    N-=1
    ans+=chr(97+N%26)
    N=N//26
  print(ans[::-1])
  return
main()
#解説AC
total = int(input())
s = input()

if total%2 == 1:
  print("No")
else:
	if(s[:total/2]==s[total/2:]):
		print("Yes")
	else:
		print("No")

### FIXED CODE ###

total = int(input())
s = input()
 
if total%2 == 1:
  print("No")
else:
  if(s[:int(total/2)] == s[int(total/2):]):
    print("Yes")
  else:
      print("No")
N, M = map(int, input().split())
A = [list(map(int,input().split())) for i in range(M)]

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)


### FIXED CODE ###

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

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)
l=map(int,input().split())
print l[0]*l[1],l[0]*2+l[1]*2

### FIXED CODE ###

l = list(map(int, input().split()))
print (l[0]*l[1],l[0]*2+l[1]*2)