Harryxun/stf_run huggingface dataset:
n=int(input())
l = []
for i in range(n):
    l.append(input())
    
min_l = min(map(int,l))
max_l = max(map(int,l))
sum_l = sum(map(int,l))

print("{0} {1} {2}".format(min_l, max_l, sum_l))

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
print(min(a),max(a),sum(a))
x = int(input())
import sys
sys.setrecursionlimit(2000)

def f(n):
  if n == 1:
    return 101
  else:
    return int(f(n-1)*1.01)
n = 1
while f(n) < x:
  n += 1
else:
  print(n)


### FIXED CODE ###

x = int(input())
import sys
sys.setrecursionlimit(4000)

import math
p = math.log(1.01, 10)
q = int(math.log(x/100, 10)/p)


def f(n):
  if n == 1:
    return 101
  else:
    return int(f(n-1)*1.01)
n = q
while f(n) < x:
  n += 1
else:
  print(n)
N, P = map(int, input().split())
if N == 1:
    print(P)
    exit()

x = ans = 1
while True:
    y = x**N
    if y > P:
        break
    if P % y == 0:
        ans = x
    x += 1
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


def main():
    N, P = map(int, input().split())
    p = prime_factorize(P)
    import collections
    ans = 1
    for k, v in collections.Counter(p).most_common():
        while v >= N:
            ans *= k
            v -= N
    print(ans)


if __name__ == '__main__':
    main()
1<= N and N<=100

N = input()
if N%2 ==0:
  n = N/2
else:
  n = N/2+1
  
print(int(n))

### FIXED CODE ###

N = input()
N =int(N)

if 1<= N and N<=100:
    if N%2 ==0:
        n = N/2
    else:
        n = N/2+1
  
print(int(n))
s=list(str(input()))
t=list(str(input()))
s.sort()
t.sort()
#print(s,t)

for i in range(min(len(s),len(t))):
    if s[i]>t[i]:
        print("Yes")
        exit()
    elif s[i]<t[i]:
        print("No")
        exit()
if len(s)<t:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s=list(str(input()))
t=list(str(input()))
s.sort()

t.sort(reverse=True)
#print(s,t)

for i in range(min(len(s),len(t))):
   # print(s[i],t[i])
    if s[i]<t[i]:
        print("Yes")
        exit()
    elif s[i]>t[i]:
        print("No")
        exit()
if len(s)<len(t):
    print("Yes")
else:
    print("No")
a,b,c = map(int,input().split())
ans = a[0] + b[0] + c[0]
print(ans.upper())

### FIXED CODE ###

a,b,c = map(str,input().split())
ans = a[0] + b[0] + c[0]
print(ans.upper())
a,b,c=input().split()
a,c=int(a),int(c)
print(abc)

### FIXED CODE ###

print(eval(input()))
from collections import deque
n,q = map(int,input().split())
graph = [[] for _ in range(n)]
cnt = [0] * n
already = [False] * n

for i in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)
    
for i in range(q):
    p,x = map(int,input().split())
    cnt[p-1] += x
wait_q = deque()
wait_q.append(0)

while len(wait_q) > 0:
    parent = wait_q.popleft()
    already[child] = True
    for child in graph[parent]:
        if child == 0:continue
        if already[child] == True:continue
        cnt[child] += cnt[parent]
        wait_q.append(child)
print(*cnt)


### FIXED CODE ###

from collections import deque
n,q = map(int,input().split())
graph = [[] for _ in range(n)]
cnt = [0] * n
already = [False] * n

for i in range(n-1):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)
    
for i in range(q):
    p,x = map(int,input().split())
    cnt[p-1] += x
wait_q = deque()
wait_q.append(0)

while len(wait_q) > 0:
    parent = wait_q.popleft()
    for child in graph[parent]:
        if child == 0:continue
        if already[child] == True:continue
        already[child] = True
        cnt[child] += cnt[parent]
        wait_q.append(child)
print(*cnt)
n = int(input())
data = [list(map(int, input().strip().split())) for _ in range(n)]

data = sorted(data, key=lambda d: d[1])

work_time = 0
impossible = False
for a, b in data:
    deadline = b
    work_time += a
    if work_time > b:
        impossible = True
        break

if impossible:
    print('No')
else:
    print('Yes')

n = int(input())
data = [list(map(int, input().strip().split())) for _ in range(n)]

data = sorted(data, key=lambda d: d[1])

work_time = 0
impossible = False
for a, b in data:
    deadline = b
    work_time += a
    if work_time > b:
        impossible = True
        break

if impossible:
    print('No')
else:
    print('Yes')



### FIXED CODE ###

n = int(input())
data = [list(map(int, input().strip().split())) for _ in range(n)]

data = sorted(data, key=lambda d: d[1])

work_time = 0
impossible = False
for a, b in data:
    deadline = b
    work_time += a
    if work_time > b:
        impossible = True
        break

if impossible:
    print('No')
else:
    print('Yes')
n = int(input())

dic = {}
for i in range(n):
  s = ''.join(sorted(list(input())))
  if not s in dic:
    dic[s] = 1
  else:
    dic[s] += 1

res = 0
for v in dic.values():
	if v >= 2:
      res += v*(v-1)
print(res//2)

### FIXED CODE ###

n = int(input())

dic = {}
for i in range(n):
  s = ''.join(sorted(list(input())))
  if not s in dic:
    dic[s] = 1
  else:
    dic[s] += 1

res = 0
for v in dic.values():
  if v >= 2:
    res += v*(v-1)
print(res//2)
import sys

N = int(input())
Xn = list(map(int, input().split()))


def cal(number):
    ans = 0
    for X in Xn:
        ans += (X - number)**2
    return ans

ans = sys.maxsize
for i in range(Xn[1], Xn[-1], 1):
    ans = min(ans, cal(i))

print(ans)


### FIXED CODE ###

import sys

N = int(input())
Xn = list(map(int, input().split()))


def cal(number):
    an = 0
    for X in Xn:
        an += (X - number)**2
    return an

ans = sys.maxsize
for i in range(min(Xn), max(Xn)+1, 1):
    ans = min(ans, cal(i))

print(ans)
S = input()
K = int(input())

c = 0
for s in S:
	if "1" == s:
		c += 1
	else:
		break

print(["1", S[c]][not((K - 1) < c)])


### FIXED CODE ###

import re

S = input()
K = int(input())

n1 = re.search("[2-9]", S)
if not n1:
	print("1")
	exit()

n1i = n1.start()
print(S[min(n1i, K - 1)])
N,W = map(int,input().split())

import numpy as np
 
dp = np.zeros(W + 1, dtype = int)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out = dp[w:])

print(dp.max())

### FIXED CODE ###

N,W = map(int,input().split())
 
import numpy as np
dp = np.full(10 ** 5 + 1, W + 1, dtype = int)
dp[0] = 0

for i in range(N):
  w, v = map(int, input().split())
  np.minimum(dp[:-v] + w, dp[v:], out = dp[v:])

for i in range(len(dp) - 1, -1, -1):
    if dp[i] <= W:
        print(i)
        break
def main():
    import sys
    input = lambda:sys.stdin.readline().rstrip()
    
    def Warshall_Floyd(d):
        for k in range(n):
            for i in range(n):
                for j in range(n):
                    d[i][j] = min(d[i][j], d[i][k]+d[k][j])
        return d
      
    n, m, l = map(int, input().split())
    f_inf = float('inf')
    dist = [[f_inf]*n for _ in range(n)]
    for i in range(m): dist[i][i] = 0
    for _ in range(m):
        a, b, c = map(int, input().split())
        dist[a-1][b-1] = c
        dist[b-1][a-1] = c

    Warshall_Floyd(dist)

    dist2 = [[f_inf]*n for _ in range(n)]
    for i in range(n):
        for j in range(n):
            if dist[i][j] <= l:
                dist2[i][j] = 1
    
    Warshall_Floyd(dist2)

    q = int(input())
    for _ in range(q):
        s, t = map(int, input().split())
        if dist2[s-1][t-1] == f_inf:
            print(-1)
        else:
          ans = dist2[s-1][t-1]
          print(ans-1)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N, M, L = map(int, input().split())
    dist = [[float('inf')] * N for _ in range(N)]
    for _ in range(M):
        A, B, C = map(int, input().split())
        if C > L:
            continue
        A -= 1
        B -= 1
        dist[A][B] = C
        dist[B][A] = C

    for k in range(N):
        for i in range(N):
            for j in range(N):
                dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

    e = [[float('inf')] * N for _ in range(N)]
    for i in range(N):
        for j in range(N):
            if dist[i][j] <= L:
                e[i][j] = 1
    
    for k in range(N):
        for i in range(N):
            for j in range(N):
                e[i][j] = min(e[i][j], e[i][k] + e[k][j])


    Q = int(input())
    for _ in range(Q):
        s, t = map(int, input().split())
        s -= 1
        t -= 1
        if e[s][t] == float('inf'):
            print(-1)
            continue
        ans = e[s][t]
        print(ans-1)


if __name__ == "__main__":
    main()
d,n = map(int,input().split())
if d == 0:
  if n!=100:
    print(n)
  else:
    print(101)
  
elif d == 1:
  if n=!100:
    print(100*n)
  else:
    print(101*100)
else:
  if n=!100:
    print(10000*n)
  else:
    print(101*10000)

### FIXED CODE ###

d,n = map(int,input().split())
if d == 0:
  if n!= 100:
    print(n)
  else:
    print(101)
  
elif d == 1:
  if n != 100:
    print(100*n)
  else:
    print(101*100)
else:
  if n != 100:
    print(10000*n)
  else:
    print(101*10000)
N=int(input())
S=input()
if N%2!=0:
    print('No')
for i in range(N/2):
    if S[i]!=S[N/2+i]:
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

N=int(input())
S=input()
if N%2!=0:
    print('No')
    exit()
for i in range(int(N/2)):
    if S[i]!=S[int(N/2)+i]:
        print('No')
        exit()
print('Yes')
N, K = map(int, imput().split())
p = K*(K-1)^(N-1)
print(p)

### FIXED CODE ###

N, K = map(int, input().split())
p = K*((K-1)**(N-1))
print(p)
import collections

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f**2 <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

count = 0

N = int(input())
c = collections.Counter(prime_factorize(N))

K = [sum(range(1,i)) for i in range(2,10)]
#print(K)
 
for i in c:
  for j in range(len(K)):
    if c[i] < K[j]:
      count += j
      break
      
print(count)

### FIXED CODE ###

line = input().split()
a = int(line[0])
b = round(float(line[1])*100)

print(a*b//100)
A, B, C, D=map(int, input().split())
X=set([for i in range(A, B+1)])
print(sum([1 for i in range(C, D+1) if i in X]))

### FIXED CODE ###

A, B, C, D=map(int, input().split())
X=set([i for i in range(A, B)])
print(sum([1 for i in range(C, D) if i in X]))
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)]%3)

### FIXED CODE ###

S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])
N = input()
A = list(map(int,input().split()))
ans = 0
def GCD(a,b):
    if a < b:
        a,b = b,a
    while a % b != 0:
        a,b = b, a % b
    print(b)

if __name__ =="__main__":
    for i in range(N-1):
       ans = GCD(A[i],A[i+1])
    print(ans)



### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
ans = 0
def GCD(a,b):
    if a < b:
        a,b = b,a
    while a % b != 0:
        a,b = b, a % b
    return b
if __name__ =="__main__":
    for i in range(N-1):
       A[i+1] = GCD(A[i],A[i+1])
    while A[N-1] % 2 == 0:
        A[N-1] //= 2
        ans += 1
    print(ans)
N=int(input())
T_N=int(input().split())
list_time = []
for i in range(N):
    list_time.append(T_N[i])
#Ti秒の総和を求める
sum=sum(list_time)
M=int(input())
for i in range(M):
    p,x=map(int,input().split())
    #ドリンク飲んだ時と飲まないときの差を元の合計に足す。
    ans=sum+x-list_time[p-1]
print(ans)


### FIXED CODE ###

A,op,B=input().split()
a=int(A)
b=int(B)
 
if op == "+" :
    print(a+b)
  
elif op == "-" :
    print(a-b)
import math

A,B = map(int, input().split())

print(int(A * B / math.gcd(A, B)))

### FIXED CODE ###

from fractions import gcd

A,B = map(int, input().split())

print(int(A * B / gcd(A, B)))
A,B = map(str, input().split())
A = int(A)
period_index = B.index(".")
B_after_the_decimal = int(B[period_index+1:])
B_before_the_decimal = int(B[0:period_index])

include_decimal = str(int(A*B_after_the_decimal))
include_decimal = include_decimal[:len(include_decimal)-(len(B) - period_index -1)]

if include_decimal != "":
    ans = include_decimal + A*B_before_the_decimal
else:
    ans = A*B_before_the_decimal
    
print(ans)

### FIXED CODE ###

A,B = map(str, input().split())
A = int(A)
period_index = B.index(".")
B_after_the_decimal = int(B[period_index+1:])
B_before_the_decimal = int(B[0:period_index])

include_decimal = str(int(A*B_after_the_decimal))
include_decimal = include_decimal[:len(include_decimal)-(len(B) - period_index -1)]

if include_decimal != "":
    include_decimal = int(include_decimal)
    ans = include_decimal + A*B_before_the_decimal
else:
    ans = A*B_before_the_decimal
    
print(ans)
s = input()
if s[0] == s[1] and s[2] == s[3] or s[1] == s[2] and s[0] == s[3] or s[0] == s[2] and s[1] == s[3] and (a[0] != a[1] and a[1] != a[2] and a[2] != a[3]):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s = input()
a = set()
for i in s: a.add(i)
if len(a) == 2 and s.count(s[0]) == 2:
    print("Yes")
else:
    print("No")
N = int(input())
SUM = 0
for i in range(1, N+1):
    print (i,(i*(N//i)*((N//i)+1))//2)
    SUM += (i*(N//i)*((N//i)+1))//2
print(SUM)

### FIXED CODE ###

N = int(input())
SUM = 0
for i in range(1, N+1):
    SUM += (i*(N//i)*((N//i)+1))//2
print(SUM)
n = int(input())

for i in range(7):
  if n > 2**i:
    ans = 2**i
print(ans)

### FIXED CODE ###

n = int(input())

for i in range(7):
  if n >= 2**i:
    ans = 2**i
print(ans)
n = int(input())
a,b = map(int,input().split())
def sp(n):
  if n == 1:
    return 2
  if n%2 == 0:
    return (sp(n//2)**2)%(10**9+7)
  if n%2 == 1:
    return (2*sp(n-1))%(10**9+7)
def com(n,a):
  if a == 1:
    return n
  return (com(n-1,a-1)+com(n-1,a))%(10**9+7)
print((sp(n)-com(n,a)-com(n,b))%(10**9+7))


  
  

### FIXED CODE ###

n,a,b = map(int,input().split())
def power(x,b):
  if x == 1:
    return b
  if x%2 == 0:
    return (power(x//2,b)**2)%(10**9+7)
  else:
    return (b*power(x-1,b))%(10**9+7)
ans = power(n,2)-1
x1 = 1
y1 = 1
x2 = 1
y2 = 1
for i in range(a):
  x1 = (x1*(n-i))%(10**9+7)
  y1 = (y1*(i+1))%(10**9+7)
for i in range(b):
  x2 = (x2*(n-i))%(10**9+7)
  y2 = (y2*(i+1))%(10**9+7)
ans -= x1*power(10**9+5,y1)
ans -= x2*power(10**9+5,y2)
print(ans%(10**9+7))
n, m = map(int, input().split())
h = list(map(int , input().split()))

G = [[] for _ in range(n)]
for _ in range(n-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
#print(G)
ans = 0
for i in range(n):
    maxh = 0
    for gi in G[i]:
        maxh = max(h[gi], maxh)
    if maxh < h[i]:
        ans += 1
    #print(maxh, h[i])

print(ans)


### FIXED CODE ###

n, m = map(int, input().split())
h = list(map(int , input().split()))

G = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
#print(G)
ans = 0
for i in range(n):
    maxh = 0
    for gi in G[i]:
        maxh = max(h[gi], maxh)
    if maxh < h[i]:
        ans += 1
    #print(maxh, h[i])

print(ans)
n = int(input())
a = [int(input()) for _ in range(n)]
index = a.index(1)+1

def solve(a,index,l):
    if l == len(a)+1:
        return print(-1)

    value = a[index-1]
    if value == 2:
        return print(l)
    else:
        solve(a,value,l+1)
    
solve(a,index,0)

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

i = 1
f = a[0]
while i< 10**6:
    
    if f == 2:
        print(i)
        break
    elif i>n+1:
        print(-1)
        break
    else:
        f = a[f-1]
        i+=1
n, m, l = [int(i) for i in input().split()]

A = [input(range(n))]
B = [input(range(m))]
C = [[0] * 1 for n in range(n)]


for ni in range(n):
    A.append([int(i) for i in input().split()])
    C[n][m] = sum([A[n][l] * B[m][l] for m in range(l)])


for mi in range(m):
    B.append([int(i) for i in input().split()])

print(" ".join([str(v) for v in C]))

### FIXED CODE ###

n, m, l = [int(i) for i in input().split()]

A = []
B = []
C = []

for ni in range(n):
    A.append([int(i) for i in input().split()])

for mi in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C.append([])
    for j in range(l):
        C[i].append(0)
        for k in range(m):
            C[i][j] += A[i][k] * B[k][j]

for li in range(n):
    print(" ".join([str(s) for s in C[li]]))
N,K,X,Y = map(int, input().split())

result = 0
if N > K:
  result = K * X + (N - K) * Y
else:
  result = N * X

print(result)


### FIXED CODE ###

N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if(N<=K):
  print(X*N)
else:
  print(X*K+(N-K)*Y)
A,B,C,D = input()
S = (A+B+C+D)
S1 = []
for i in S:
    if i.strip(A) !='':
        S1.append(i.strip(A))
if S1[0] == S1[1] and len(S1) == 2:
    print("Yes")
else :
    print("No")


### FIXED CODE ###

A,B,C,D = input()
S = (A+B+C+D)
S1 = []
if A == B == C== D:
    print('No')
    exit()
for i in S:
    if i.strip(A) !='':
        S1.append(i.strip(A))
if len(S1) == 2:
        if S1[0] == S1[1]:
            print("Yes")
        else:
            print("No")
else :
    print("No")
r = int(input())
print(r * r * 3.14159, 2 * r * 3.14159)

### FIXED CODE ###

a, b = map(int, input().split())
print(a //b , a % b, "{0:.5f}".format(a / b))
x = input()
print(x^3)

### FIXED CODE ###


x = int(input())
print(x**3)
import sys
sys.setrecursionlimit(10070)
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True  and False
MOD = 10**9 + 7

def f(s,r):
    sz = len(s)
    n = int(s[0])
    if sz==1:
        sum = 0
        for i in range(n+1):
          if (r-i)%d == 0:
            sum += 1
        return sum
    sum = f(s[1:], (r-n)%d)
    for i in range(n):
        sum += dp[sz-1][(r-i)%d]
        if sum >= MOD:
            sum -= MOD
    return sum

k = input()
d = inn()
e = len(k)
dp = [ [0 for i in range(d)] for j in range(e) ]
for i in range(10):
    dp[1][i%d] += 1
for i in range(2,e):
  for j in range(d):
    for m in range(10):
        dp[i][j] += dp[i-1][(j-m)%d]
        if dp[i][j] >= MOD:
            dp[i][j] -= MOD
print((f(k,0)-1)%MOD)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10070)
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True  and False
MOD = 10**9 + 7

def f(s,r):
    sz = len(s)
    n = int(s[0])
    if sz==1:
        sum = 0
        for i in range(n+1):
          if (r-i)%d == 0:
            sum += 1
        return sum
    sum = f(s[1:], (r-n)%d)
    for i in range(n):
        sum += dp[sz-1][(r-i)%d]
        if sum >= MOD:
            sum -= MOD
    return sum

k = input()
d = inn()
e = len(k)
dp = [ [0 for i in range(d)] for j in range(max(2,e)) ]
for i in range(10):
    dp[1][i%d] += 1
for i in range(2,e):
  for j in range(d):
    for m in range(10):
        dp[i][j] += dp[i-1][(j-m)%d]
        if dp[i][j] >= MOD:
            dp[i][j] -= MOD
print((f(k,0)-1)%MOD)
d=input()
arr = [int(d) for i in d.split()]

t1 = arr[0]/arr[-1]
if t1<= arr[1]:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

d=input()
arr = [int(i) for i in d.split()]

t1 = arr[0]/arr[-1]
if t1<= arr[1]:
  print("Yes")
else:
  print("No")
def valid(words):
  used = set()
  last = ""

  for w in words:
    if w in used:
      return False
    if last != "" and last[-1] != w[0]:
      return False
    last = w
    used.append(w)
  return True

n = int(input())
words = [input() for _ in range(n)]
print("Yes" if valid(words) else "No")

### FIXED CODE ###

def valid(words):
  used = set()
  last = ""

  for w in words:
    if w in used:
      return False
    if last != "" and last[-1] != w[0]:
      return False
    last = w
    used.add(w)

  return True


n = int(input())
words = [input() for _ in range(n)]
print("Yes" if valid(words) else "No")
l=map(int,input().split())
l.remove(max(l))
print(l[0]*l[1])


### FIXED CODE ###

l=list(map(int,input().split()))
l.remove(max(l))
print(l[0]*l[1]//2)
N, K = map(int, input().split())
dist = [[] for i in range(N)]
A = list(map(int, input().split()))
for i in range(N):
    dist[i].append(A[i] - 1)
dp = [[0, 0] for i in range(N)]
 
def dfs(pos, depth):
    # 初めての訪問なら
    if dp[pos][0] == 0:
        dp[pos][0] = depth
        for i in dist[pos]:
            dfs(i, depth + 1)
    elif dp[pos][1] == 0:
        dp[pos][1] = depth
        for i in dist[pos]:
            dfs(i, depth + 1)
dfs(0, 0)
for i in range(N):
    if dp[i][0] == K or dp[i][1] == K:
        print(i + 1)
        break
    else:
        split = dp[i][1] - dp[i][0]
        if split > 0:
            if (K - dp[i][0]) % split == 0:
                print(i + 1)
                break

### FIXED CODE ###

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict, deque
from sys import exit
import math
import copy
from bisect import bisect_left

import sys
# sys.setrecursionlimit(1000000)
# list(map(int, input().split()))
n, k = getList()
# dist
nums = [0] + getList()
cnt = 1
if k == 1:
    print(1)
    exit()
cur = 1
visited = [-1 for i in range(n + 1)]
visited[1] = 1
rooped = False
while True:
    # cur 行き先
    cur = nums[cur]
    cnt += 1

    # １回目に訪れていたら
    if visited[cur] != -1:
        # ループの周期
        roop = cnt - visited[cur]
        # 途中を飛ばす
        k -= ((k-cnt) // roop) * roop
        rooped = True
    if not rooped:
        # １回目に訪れたのであれば
        visited[cur] = cnt

    if cnt == k:
        print(nums[cur])
        break
integer = int(input().split())
conbi = ((integer[0] * (integer[0] - 1) + integer[1] * (integer[1] -1 )) / 2
print(conbi)

### FIXED CODE ###

integer = list(map(int, input().split())) 
conbi = (integer[0] * (integer[0] - 1) + integer[1] * (integer[1] -1 ) ) / 2
print(int(conbi))
from numba import njit
import numpy as np


def main(S, T):
    if len(T)-len(S) != 1:
        print("No")
        return
    count = 0
    for i in range(len(S)):
        if S[i] != T[i]:
            count += 1
            if count > 0:
                print("No")
                return
    print("Yes")


main(S, T)


### FIXED CODE ###

from numba import njit
import numpy as np


def main(S, T):
    if len(T)-len(S) != 1:
        print("No")
        return
    count = 0
    for i in range(len(S)):
        if S[i] != T[i]:
            count += 1
            if count > 0:
                print("No")
                return
    print("Yes")


S = input()
T = input()
main(S, T)
n = int(input())
li = list(map(int,input().split()))
a = li[0]
del li[0]
def f(num1,num2,l):
  if l == []:
    return True
  else:
    if num1^num2 in l:
      return f(num2,num1^num2,l[1:])
    else:
      return False
for i in li:
  if f(a,i,li[1:]):
    print("Yes")
    exit()
  else:continue
print("No")

### FIXED CODE ###

n=int(input())
*a,=map(int,input().split())
s=list(set(a))
s.sort()
ans="No"
if len(s)==1:
  if 0 in s:
    ans="Yes"
elif len(s)==2:
  if a.count(0)*2==a.count(s[1]):
    ans="Yes"
elif len(s)==3 and a.count(s[0])==a.count(s[1])==a.count(s[2]) and s[0]^s[1]^s[2]==0:
  ans="Yes"
print(ans)
n = int(input())
A = [int(input()) for i in range(n)]
  
for i in range(n):
  Ai = A[:]
  Ai.pop(i)
  print(max(Ai))

### FIXED CODE ###

a = int(input())
s = a**2 * 3
print(s)
N = int(input())
A = list(map(int, input().split()))
 
L = [0]*(N+2)
R = [0]*(N+2)
 
import fractions
 
for i in range(1,N+1):
    L[i] = fractions.gcd(L[i-1],A[i-1])
for i in range(0,N)[::-1]:
    R[i] = fractions.gcd(R[i+1],A[i])
 
M = [fractions.gcd(L[i-1],R[i]) for i in range(1,N+1)]
print(max(M))

### FIXED CODE ###

A, B, T = map(int,input().split())

print(int((T+0.5)//A * B))