Harryxun/stf_run huggingface dataset:
S = input()
K = long(input())

for i in range(len(S)) :
	if (S[i] == "1") :
		continue
	
	print(S[i])
	break

### FIXED CODE ###

def main() :
	S = input()
	K = int(input())

	is_1 = True
	for i in range(K) :
		if (len(S) < i) :
			break

		# print("S[i] : " + S[i])
		if (S[i] != "1") :
			is_1 = False
			break

	if (is_1) :
		print("1")
		return

	for i in range(len(S)) :
		if (S[i] == "1") :
			continue

		print(S[i])
		break


main()
ok = [[0,4,8], [2,4,6], [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8]]
while True:
    s = input()
    if len(s) == 0:
        break
    maru = []
    batu = []
    for i in range(9):
        if s[i] == 'o':
            maru.append(i)
        elif s[i] == 'x':
            batu.append(i)
    flag = False
    for i in ok:
        if i == maru:
            print("o")
            flag = True
            break
        elif i ==batu:
            print("x")
            flag = True
            break
    if not flag:
        print("d")

### FIXED CODE ###

ok = [[0,4,8], [2,4,6], [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8]]
while True:
    try:
        s = input()
    except EOFError:
        break
    flag = False
    for i in ok:
        if s[i[0]] == s[i[1]] == s[i[2]] and s[i[0]] != 's':
            print(s[i[0]])
            flag = True
            break
    if flag:
        continue
    print("d")
import sys
from heapq import*
e=sys.stdin.readline
I=float("inf")
def m():
 n=int(e())
 A=[]
 for _ in[0]*n:
  e=list(map(int,e().split()))
  A+=[zip(e[2::2],e[3::2])]
 d=[0]+[I]*n
 H=[(0,0)]
 while H:
  u=heappop(H)[1]
  for v,c in A[u]:
   t=d[u]+c
   if d[v]>t:
    d[v]=t
    heappush(H,(t,v))
 print('\n'.join(f'{i} {d[i]}'for i in range(n)))
m()


### FIXED CODE ###

from heapq import*
def m():
 n=int(input())
 A=[]
 for _ in[0]*n:
  e=list(map(int,input().split()))
  A+=[zip(e[2::2],e[3::2])]
 d=[0]+[float('inf')]*n
 H=[(0,0)]
 while H:
  u=heappop(H)[1]
  for v,c in A[u]:
   t=d[u]+c
   if d[v]>t:
    d[v]=t
    heappush(H,(t,v))
 print('\n'.join(f'{i} {d[i]}'for i in range(n)))
m()
a, b, c = map(imput().split())
print(a if b == c else b if a == c else c)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(a if b == c else b if a == c else c)
# -*- coding: utf-8 -*-
import sys
import math
# sys.setrecursionlimit(10000)


def main():
    # 入力処理
    N, M = map(int, input().split())

    # アルゴリズム本体
    if N >= 2 * M:
        K = int(M / 2)
    else:
        K = N + int((M - 2 * N) / 4)

    # 出力
    print(K)


if __name__ == '__main__':
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
# sys.setrecursionlimit(10000)


def main():
    # 入力処理
    N = int(input())

    # アルゴリズム本体
    x = 800 * N
    y = 200 * int(N / 15)

    # 出力
    print(x-y)


if __name__ == '__main__':
    main()
getime(n):
    h = m = s = 0
    while n >= 3600:
        n -= 3600
        h += 1
    while n >= 60:
        n -= 60
        m += 1
    s = n
    return h, m, s

h,m,s = getime(int(input()))
print("{}:{}:{}".format(h,m,s))


### FIXED CODE ###

def getime(n):
    h = m = s = int()
    while n >= 3600:
        n -= 3600
        h += 1
    while n >= 60:
        n -= 60
        m += 1
    s = n
    return h, m, s

n = int(input())
h,m,s = getime(n)
print("{}:{}:{}".format(h,m,s))
a,b = map(int, raw_input().split());

print(2*(a+b) a*b);

### FIXED CODE ###

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

print a*b, 2*(a+b)
def tans(N, sei):
  import math
  sin = int(math.log(N,9))
  cos = int(math.log(N,6))
  count = sei
  if ((sin != 0) and (cos != 0)):
    if N < 15:
      if N >= 12:
        count += 2
        b2 = N - 12
        return tans(b2, count)
    elif (math.pow(9, sin) > math.pow(6,cos)):
      c = int(N - math.pow(9,sin))
      count += 1
      return tans (c, count)
    else:
      c2 = int(N - math.pow(6,cos))
      count += 1
      return tans (c2, count)
  else:
    count += N
    return count

n1 = int(input())
print(tans(n1, 0))

### FIXED CODE ###

from itertools import count, takewhile, dropwhile
 
def dfs(n, max9, max6, d={0:0}):
    if n in d: 
      return d[n]
  
    max9 = next(dropwhile(lambda x: x>n, (max9 / 9**i for i in count())))
    max6 = next(dropwhile(lambda x: x>n, (max6 / 6**i for i in count())))
    d[n] = min(dfs(n-max9, max9, max6), dfs(n-max6, max9, max6)) + 1
    return d[n]
 
n = int(input())
 
max9 = max(takewhile(lambda x: x<=n, (9**i for i in count())))
max6 = max(takewhile(lambda x: x<=n, (6**i for i in count())))
 
print(dfs(n, max9, max6))
a,op,b=map(str,input().split())
while op not '?':
 if op=='+':
   print(int(a)+int(b))
 elif op=='-':
   print(int(a)-int(b))
 elif op=='*':
   printf(int(a)*int(b))
 elif op=='/':
   printf(int(a)//int(b))
 a,op,b=map(str,input().split())



### FIXED CODE ###

while True:
 a,op,b=map(str,input().split())
 if op=='+':
   print(int(a)+int(b))
 elif op=='-':
   print(int(a)-int(b))
 elif op=='*':
   print(int(a)*int(b))
 elif op=='/':
   print(int(a)//int(b))
 elif op=='?':
   break
n = int(input())
if str(n[0]) = str(n[2]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = input()
if n[0] == n[-1]:
    print('Yes')
else:
    print('No')
n, q = [int(el) for el in input().split(' ')]
data = [0] * n
ex_result, exx_result = 0, 0
ex_index, exx_index  = 0, 0
for _ in range(q):
    a, v = [int(el) for el in input().split(' ')]
    data[a-1] += v
    if ex_index != a:
        if v < 0: result = ex_result
        else: result = max(ex_result, data[a-1])
    else:
        if v > 0: result = data[a-1]
        else:
            if exx_index == a: result = max(data)
            else: result = max(exx_result, data[a-1])
    index = data.index(result) + 1
    print(index, result)
    exx_result = ex_result
    ex_result = result
    exx_index = ex_index
    ex_index = index

### FIXED CODE ###

n, q = [int(el) for el in input().split(' ')]
data = [0] * n
result, index = 0, 1
for _ in range(q):
    a, v = [int(el) for el in input().split(' ')]
    data[a-1] += v
    if v > 0:
        if result < data[a-1]:
            result, index = data[a-1], a
        elif result == data[a-1]:
            index = min(index, a)
    else:
        if index == a:
            result = max(data)
            index = data.index(result) + 1
    print(index, result)
n,m = map(int,input().split())
t = [[] for _ in range(n)]
for i in range(m):
    t_1,t_2 = map(int,input().split())
    t[t_1-1].append(t_2)

ans = ""
for i in range(n):
    if len(set(t[i])) == 1:
        ans += str(t[i][0])
    if not t[i]:
        if i == 0:
            ans += "1"
        else:
            ans += "0"
if ans[0] == "0":
    if n == 1:
        print(0)
    else:
        print(-1)
else:
    print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
t = [[] for _ in range(n)]
for i in range(m):
    t_1,t_2 = map(int,input().split())
    t[t_1-1].append(t_2)

ans = ""
for i in range(n):
    if len(set(t[i])) == 1:
        ans += str(t[i][0])
    elif not t[i]:
        if i == 0:
            if n == 1:
                ans += "0"
            else:    
                ans += "1"
        else:
            ans += "0"
    else:
        print(-1)
        exit()
if ans[0] == "0":
    if n == 1:
        print(0)
    else:
        print(-1)
else:
    print(ans)
import sys
# sys.stdin = open('input.txt')

nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]


n = int(input())
a = [i for i in map(int, input().split())]

cnt = {}
for i in a:
    if i not in cnt.keys():
        cnt[i] = 1
    else:
        cnt[i] += 1

total = 0

for i in cnt.values():
    if i >= 2:
        total += cmb(i, 2)

ansDic = {}

for i in range(n):
    if a[i] in ansDic.keys():
        print(ansDic[a[i]])
    else:
        x = cnt[a[i]]
        ans = total
        if x >= 2:
            ans = total - cmb(x, 2)
        if x-1 >= 2:
            ans += cmb(x-1, 2)
        ansDic[a[i]] = ans
        print(ans)

### FIXED CODE ###

import sys
# sys.stdin = open('input.txt')

nCr = {}
def cmb2(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result


n = int(input())
a = [i for i in map(int, input().split())]

cnt = {}
for i in a:
    if i not in cnt.keys():
        cnt[i] = 1
    else:
        cnt[i] += 1

total = 0

for i in cnt.values():
    if i >= 2:
        total += cmb(i, 2)

ansDic = {}

for i in range(n):
    if a[i] in ansDic.keys():
        print(ansDic[a[i]])
    else:
        x = cnt[a[i]]
        ans = total
        if x >= 2:
            ans = total - cmb(x, 2)
        if x-1 >= 2:
            ans += cmb(x-1, 2)
        ansDic[a[i]] = ans
        print(ans)
# input
S = [list(input()) for _ in range(3)]

P_curr = 0

while S[P_curr] != []
    if S[P_curr][0] == 'a':
        P_curr = 0
    if S[P_curr][0] == 'b':
        P_curr = 1
    if S[P_curr][0] == 'c':
        P_curr = 2
    del S[P_curr][0]

if P_curr == 0:
    print('A')
if P_curr == 1:
    print('B')
if P_curr == 2:
    print('C')



### FIXED CODE ###

# input
S = [list(input()) for _ in range(3)]

P_curr = 0

while S[P_curr] != []:
    if S[P_curr][0] == 'a':
        del S[P_curr][0]
        P_curr = 0
    elif S[P_curr][0] == 'b':
        del S[P_curr][0]
        P_curr = 1
    elif S[P_curr][0] == 'c':
        del S[P_curr][0]
        P_curr = 2

if P_curr == 0:
    print('A')
if P_curr == 1:
    print('B')
if P_curr == 2:
    print('C')
#include<iostream>

void cal_area(a,b){
    return a*b;
}
void cal_parimeter(a,b){
    return 2*(a+b);
}

output(a,b){
    print(a << " " << b);
}

void input(){
    std::cin >> a >> b;
    output(cal_area(a,b), cal_parimeter(a,b));
}
int main(){
    input();
    return 0;
}



### FIXED CODE ###

a,b = map(int, input().split())
print(a*b, 2*(a+b))
from collections import deque

def pIsAccptbl(w,k,p):
    tr = 0
    c = 0
    while(w):
        tmp = w.popleft()
        if( tr + tmp > p):
            tr = tmp
            c += 1
        else:
            tr += tmp

    c+=1
    if c>k:
        return False
    else:
        return True
    
n,k = input().split()
w = collections.deque()
for i in range(int(n)):
    w.append(int(input()))

p = max(w)
'''
while(1):
    x=w.copy()
    if(pIsAccptbl(x,int(k),p)):
        print(p)
        break
    else:
        p+=1
'''

### 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
from sys import stdin

readline = stdin.readline

_, *a = map(int, open(0).read().split())
res = 0
mi = 1_000_000_000
rem = True
for v in a:
    if v < 0:
        rem = not rem
    b = abs(v)
    res += b
    mi = min(b, mi)
if rem:
    res -= mi*2
print(res)


### FIXED CODE ###

from sys import stdin

readline = stdin.readline

_, *aa = map(int, open(0).read().split())
r = 0
mi = 1000000000
m = 0
for a in aa:
    if a < 0:
        m += 1
    b = abs(a)
    r += b
    mi = min(b, mi)
print(r - mi * 2 * (m % 2))
import math
N, X = map(int,input().split())
x = list(map(int,input().split()))
L = []
for i in range(N):
    y = math.fabs(X-x[i])
    y = int(y)
    L.append(y)
ans = L[0]
for i in range(len(L)):
    ans = math.gcd(ans,L[i])
print(ans)

### FIXED CODE ###

import math
from fractions import gcd
N, X = map(int,input().split())
x = list(map(int,input().split()))
L = []
for i in range(N):
    y = math.fabs(X-x[i])
    y = int(y)
    L.append(y)
ans = L[0]
for i in range(len(L)):
    ans = gcd(ans,L[i])
print(ans)
R = int(input())

if R < 1200:
	print(“ABC”)
elif R < 2800:
	print(“ARC”)
else:
	print(“AGC”)


### FIXED CODE ###

R = int(input())

if R < 1200:
	print("ABC")
elif R < 2800:
	print("ARC")
else:
	print("AGC")
x=int(input())
DP=[False]*(x+1)
for i in range(x+1):
  coin=list(range(100,106,1))
  if i in coin:
    DP[i]=True
    continue
  DP[i]=True if any(DP[i-m] for m in coin) else False
print(1 if DP[x]==True else 0)

### FIXED CODE ###

x=int(input())
if x<100:
  print(0)
  exit()
elif 100<=x<=105:
  print(1)
  exit()
else:
  DP=[False]*(x+1)
  for i in range(x+1):
    coin=list(range(100,106,1))
    if i in coin:
      DP[i]=True
      continue
    DP[i]=True if any(DP[i-m] for m in coin) else False
  print(1 if DP[x]==True else 0)
def paint():
    a = int(input())
    b = int(input())
    c = int(input())
    count = 1
    if a != b:
        count += 1
    if a != c and b != c:
        count += 1

    

    print(count)

paint()

### FIXED CODE ###

def paint():
    s = input()
    slist = s.split(' ')

    a = int(slist[0])
    b = int(slist[1])
    c = int(slist[2])
    count = 1
    if a != b:
        count += 1
    if a != c and b != c:
        count += 1

    print(count)

paint()
in = int(input())
print(int(in % 1000))

### FIXED CODE ###

pyment = int(input())
if pyment % 1000 == 0:
    print(0)
else:
    print(1000 - int(pyment % 1000))
import collections

n = int(input())

l = []

for i in range(n):
    l.append(input())
c = collections.Counter(l)
cx = c.most_common()
nm = cx[0][1]
for i in range(n):
    if (nm == cx[i][1]):
        print(cx[i][0])
    else:
        break

### FIXED CODE ###

import collections

n = int(input())

l = []

for i in range(n):
    l.append(input())
c = collections.Counter(l)
cx = c.most_common()
nm = cx[0][1]
ans = []
ans.append(cx[0][0])
for i in range(1, len(cx)):
    if (nm == cx[i][1]):
        ans.append(cx[i][0])
    else:
        break

ansx = sorted(ans)
for i in range(len(ans)):
    print(ansx[i])
N = int(input())
A_list = input().split()
A_list_i = [int(s, 0) for s in A_list]
max_gcd = 0
min_gcd = [10000000000, -1]
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp
        if temp < min_gcd[0]:
            min_gcd[0] = temp
            if A_list_i[i] > A_list_i[j]:
                min_gcd[1] = i
            else:
                min_gcd[1] = j
A_list_i[min_gcd[1]] = max_gcd
temp = 0
max_gcd = 0
for i in range(N-1):
    for j in range(i+1, N):
        if A_list_i[i] == A_list_i[j]:
            temp = A_list_i[i]
        elif A_list_i[i] > A_list_i[j]:
            temp = A_list_i[i] % A_list_i[j]
        else:
            temp = A_list_i[j] % A_list_i[i]
        if temp > max_gcd:
            max_gcd = temp            
print('%d' % max_gcd)

### FIXED CODE ###

raw_input = input()
a, b, t = map(int, raw_input.split())
counter = (t+0.5)//a #クッキを焼く回数
number = b * counter #枚数
print('%d' % number)
a, b, x =map(int, inpit().split())

if 0 <= (x-a) <= b:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

if 0 <= x-a <= b:
  print('YES')
else:
  print('NO')
H, W = [int(i) for i in input().split()]
sy, sx = [0,0]
gy, gx = [H-1, W-1]
c_ls = list()
yet_ls = [(sy,sx)]
dist_dict = {(sy, sx): 0}
road_len = 0
for i in range(H):
    c_ls.append([i for i in list(input())])
    road_len += len([i for i in c_ls[-1] if i == "."])


def dfs():
    ind = 0
    while len(yet_ls) > ind:
        y, x = yet_ls[ind]
        for move_y, move_x in [(1,0),(-1,0),(0,1),(0,-1)]:
            next_y = y + move_y
            next_x = x + move_x
            if 0 <= next_y < H and 0 <= next_x < W:
                pass
            else:
                continue
            if c_ls[next_y][next_x] == "#":
                continue
            c_ls[next_y][next_x] = "#"
            if (next_y, next_x) not in dist_dict:
                dist_dict[(next_y, next_x)] = dist_dict[(y,x)] + 1
                yet_ls.append((next_y,next_x))
            if (next_y, next_x) == (gy, gx):
                return dist_dict[(next_y, next_x)]
        ind += 1

print(road_len - dfs() - 1)

### FIXED CODE ###

H, W = [int(i) for i in input().split()]
sy, sx = [0,0]
gy, gx = [H-1, W-1]
c_ls = list()
yet_ls = [(sy,sx)]
dist_dict = {(sy, sx): 0}
road_len = 0
for i in range(H):
    c_ls.append([i for i in list(input())])
    road_len += len([i for i in c_ls[-1] if i == "."])


def dfs():
    ind = 0
    while len(yet_ls) > ind:
        y, x = yet_ls[ind]
        for move_y, move_x in [(1,0),(-1,0),(0,1),(0,-1)]:
            next_y = y + move_y
            next_x = x + move_x
            if 0 <= next_y < H and 0 <= next_x < W:
                pass
            else:
                continue
            if c_ls[next_y][next_x] == "#":
                continue
            c_ls[next_y][next_x] = "#"
            if (next_y, next_x) not in dist_dict:
                dist_dict[(next_y, next_x)] = dist_dict[(y,x)] + 1
                yet_ls.append((next_y,next_x))
            if (next_y, next_x) == (gy, gx):
                return dist_dict[(next_y, next_x)]
        ind += 1
    return road_len


print(road_len - dfs() - 1)
s,t=input(),input()
print(sum([1 if c is d for c,d in s,t]))

### FIXED CODE ###

s,t=input(),input()
print(sum(c is d for c,d in zip(s,t)))
n,m = map(int,input().split())
a = list(map(int,input().split()))
fl = "Yes"

a.sort(reverse = True)
s = sum(a)

for i in range(m):
    if a[m] < s * (1 / (4*m)):
        fl = "No"
        
print(fl)

### FIXED CODE ###

n,m = map(int,input().split())
a = list(map(int,input().split()))
fl = "Yes"

a.sort(reverse = True)
s = sum(a)

for i in range(m):
    if a[i] < s * (1 / (4*m)):
        fl = "No"
        
print(fl)
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)
 
if K >= len(H):
	print(0)
elif: K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))

### FIXED CODE ###

N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)

if K >= int(N):
	print(0)
elif K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))
a, b, k = [int(i) for i in input().split(" ")]
if a >= k:
    print("%d %d" % (a - k, b))
else: # a < k
    print("%d %d" % (0, max([b + (a - k), 0]))



### FIXED CODE ###

a, b, k = [int(i) for i in input().split(" ")]
if a >= k:
    print("%d %d" % (a - k, b))
else: # a < k
    print("%d %d" % (0, max([b + (a - k), 0])))
n=int(input())
s,p=list(map(int,input().split()))
li=[]
for i in range(0,n):
  li.append((i+1,s[i],p[i]))

new_li=sorted(li,key=lambda x:x[1])
new2_li=sorted(new_li,key=lambda x:x[2])

for j in range(0,n):
  print(new2_li[j][0])

### FIXED CODE ###

n=int(input())

li=[]

for i in range(0,n):
  s,p=input().split()
  p=int(p)
  li.append((i+1,s,p))


new_li=sorted(li,key=lambda x:x[2] , reverse=True)
new2_li=sorted(new_li,key=lambda x:x[1])


for j in range(0,n):
  print(new2_li[j][0])
a=int(input())
a=int(input())
a=int(input())
print((a+b)*h/2)


### FIXED CODE ###

a=int(input())
b=int(input())
h=int(input())

print(((a+b)*h)//2)
A,B,C = map(int,input())
if A == b and B == C:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

A,B,C = map(int,input().split())
if A == B and B == C:
  print('Yes')
else:
  print('No')
k, s = list(map(int, input().split()))

p = s
factors = {}

while p > 1:
    f = False
    for i in range(2, int(p**0.5)+1):
        if p % i == 0:
            if i in factors:
                factors[i] += 1
            else:
                factors[i] = 1

            p //= i
            f = True
            break

    if not f:
        if p in factors:
            factors[p] += 1
        else:
            factors[p] = 1
        break

if len(factors) == 0:
    print(1)
else:
    primes = list(factors.keys())
    exp = [0] * len(primes)
    upper = s/k
    ans = 1

    while exp[0] <= factors[primes[0]]:
        num = 1
        for i in range(len(primes)):
            num *= pow(primes[i], exp[i])

        if num == upper:
            ans = num
            break
        elif num < upper:
            ans = max(ans, num)

        index = len(primes)-1
        done = False
        while not done:
            exp[index] += 1
            if exp[index] > factors[primes[index]]:
                if index == 0:
                    break
                else:
                    exp[index] = 0
                    index -= 1
            else:
                done = True

    print(ans)


### FIXED CODE ###

n=int(input())

if(n==1):
    print("Hello World")
elif(n==2):
    a=int(input())
    b=int(input())
    print(int(a+b))
N,M = map(int,input().split())
A = list(map(int,input().split()))

R = [A[0]%M]

for i in range(1,N):
  R.append((R[-1]+A[i])%M)
  
  
k = set(R)
dic = {i:0 for i in k}
for item in R:
  dic[item]+=1


#print(dic)
ans = dic[0]*(dic[0]+1)//2
for i in k:
  if i !=0 :
    ans += dic[i]*(dic[i]-1)//2

  
print(ans)


### FIXED CODE ###

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

R = [A[0]%M]


for i in range(1,N):
  R.append((R[-1]+A[i])%M)



import collections
c = collections.Counter(R)


ans = 0
for key in c:
  if key == 0:
    ans += (c[key]*(c[key]+1))/2
  else:
    ans += (c[key]*(c[key]-1))/2
  



print(int(ans))
import collections
n=int(input())
S=input()
c=collections.Counter(S)
C=len(c)
ans=2**C*1.5**(n-C)
ans-=1
ans%=(10**9+7)
print(int(ans))

### FIXED CODE ###

n=int(input())
S=input()
a='abcdefghijklmnopqrstuvwxyz'
ans=1
for i in range(26):
  cnt=S.count(a[i])
  ans=ans*(cnt+1)
ans-=1
ans=ans%(10**9+7)
print(int(ans))