Harryxun/stf_run huggingface dataset:
n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
    r[i//400] += 1

if sum([1 for i in r[:-1] if i != 0]) == 0:
    print(1, r[-1])

else:
    mi = sum([1 for i in r[:-1] if i != 0])
    ma = mi + r[-1]
    print(mi, ma)

### FIXED CODE ###

from bisect import bisect_right

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

r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
c = [0] * 9

for score in a:
	i = bisect_right(r, score)
	c[i] += 1

ans = 8 - c[:-1].count(0)

print(max(1, ans), ans + c[8])
a,b = [int(x) for x in input().split()]
out = 'Odd'
if(a%2==0 or b%2==0):
  out = 'Even'

return out

### FIXED CODE ###

def main():
  a,b = [int(x) for x in input().split()]
  out = 'Odd'
  if(a%2==0 or b%2==0):
    out = 'Even'
  print(out)
  return 0;

if __name__ == "__main__":
    main()
s = input()
t = input()
dp = [[0]*(len(t)+1) for _ in range(len(s)+1)]

def backtrack(dp, s, t, i, j):
    if i == 0 or j == 0:
        return ''
    if s[i-1] == t[j-1]:
        return backtrack(dp, s, t, i-1, j-1) + s[i-1]
    if dp[i][j-1] > dp[i-1][j]:
        return backtrack(dp, s, t, i, j-1)
    return backtrack(dp, s, t, i-1, j)

for i in range(1, len(s)+1):
    for j in range(1, len(t)+1):
        if s[i-1] == t[j-1]:
            dp[i][j] = max(dp[i][j], dp[i-1][j-1] + 1)
        else:
            dp[i][j] = max(dp[i][j-1], dp[i-1][j])
print(backtrack(dp, s, t, len(s), len(t)))

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
s = input()
t = input()
dp = [[0]*(len(t)+1) for _ in range(len(s)+1)]

def backtrack(dp, s, t, i, j):
    if i == 0 or j == 0:
        return ''
    if s[i-1] == t[j-1]:
        return backtrack(dp, s, t, i-1, j-1) + s[i-1]
    if dp[i][j-1] > dp[i-1][j]:
        return backtrack(dp, s, t, i, j-1)
    return backtrack(dp, s, t, i-1, j)

for i in range(1, len(s)+1):
    for j in range(1, len(t)+1):
        if s[i-1] == t[j-1]:
            dp[i][j] = max(dp[i][j], dp[i-1][j-1] + 1)
        else:
            dp[i][j] = max(dp[i][j-1], dp[i-1][j])
print(backtrack(dp, s, t, len(s), len(t)))
n = int(input())
a = int(input())
b = int(input())

sum = 0

while(n > a):
    n = n-a-b
    sum += a

print(sum+n)

### FIXED CODE ###

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

sum = n//(a+b)*a
res = n%(a+b)
sum += min(res,a)

print(sum)
import math
n=input()
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=math.inf
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)

### FIXED CODE ###

n=int(input())
Xs=list(map(int,input().split()))
Xs.sort()
a=Xs[0]
b=Xs[-1]
ans=float("inf")
for p in range(a,b+1):
    m=0
    for x in Xs:
        m+=(x-p)**2
    if m<ans:
        ans=m
print(ans)
S = input()
K = int(input())

if len(set(s)) == 1:
    print(len(S)*K//2)
    exit()

b = [1]
for i in S[:-1]:
    if S[i] == S[i+1]:
        b[-1] += 1
    else:
        b.append(1)

ans = 0
for i in b:
    ans += i//2
ans *= K

if S[0] == S[-1] and b[0]%2 == b[-1]%2 == 1:
    ans += K - 1
print(ans)

### FIXED CODE ###

S = input()
K = int(input())
now,cnt,num = S[0],1,0
for i in S[1:-1]:
    if i == now:
        cnt += 1
    else:
        num += cnt//2
        cnt = 1
        now = i
if S[-1] == now:
    num += (cnt+1)//2
else: num += cnt//2

S = S + S
now,cnt,num2 = S[0],1,0
for i in S[1:-1]:
    if i == now:
        cnt += 1
    else:
        num2 += cnt//2
        cnt = 1
        now = i
if S[-1] == now:
    num2 += (cnt+1)//2
else: num2 += cnt//2

length = len(S)//2
if len(set(S)) == 1 and length%2 == 1:
    print(length//2*K + K//2)
    exit()

if num2 - num*2 == 1:
    ans = K - 1 + num*K
else:
    ans = num*K
print(ans)
list = list(input())
for i in len(list):
    n = 0:
    if int(list[i]) ==1:
        n += 1
print(n)


### FIXED CODE ###

L = input()
n=0
for i in range(len(L)):
    if int(L[i]) ==1:
        n += 1
print(n)
x a = map(int, input())

if x < a:
  print(0)
else:
  print(10)

### FIXED CODE ###

x, a = map(int, input().split())
 
if x < a:
  print(0)
else:
  print(10)
count=0
int a,b,c=int(input())
if a>0:
	count+=1
if b>0:
	count+=1
if v>0:
	count+=1
print(count)

### FIXED CODE ###

count=0
a,b,c=input()
if a=="1":
	count+=1
if b=="1":
	count+=1
if c=="1":
	count+=1
print(count)
# D - Score Attack
import sys
sys.setrecursionlimit(10 ** 9)

import numpy as np
from heapq import heappush, heappop

N, M, = map(int, input().split())
graph = [[] for _ in range(N+1)] # graph[0]は使わない

for _ in range(M):
    a, b, c = map(int, input().split())
    graph[a].append((b, -c)) # ヒープ構造を使うため重みはマイナスの値

def dijkstra(start, co):
    INF = float('inf')
    dist = [INF] * (N+1) # dist[0]は使わない
    dist[start] = 0
    que = [(0, start, co)] # queではscoreを先頭に
    while que:
        score, place, count = heappop(que) # placeは現在地
        if score > dist[place] or count > 2000: # 前来た時より点数が悪いか、無限ループしている場合continue
            continue
        for next_node, weight in graph[place]:
            score2 = score + weight
            if next_node == N and count > 1000: # いくらでも大きくなる場合
                print('inf')
                exit()
            if dist[next_node] > score2: # 点数が良くなるなら、データを更新
                dist[next_node] = score2
                heappush(que, (score2, next_node, count+1))
    return dist

d1 = np.array(dijkstra(1, 0))
print(-int(d1[N]))

### FIXED CODE ###

import sys

INF = float('inf')

def Bellmanford(n, edges, r): #r: 始点
    d = [INF] * n
    d[r] = 0
    
    for i in range(n):
        for (u, v, c) in edges:
            if d[u] != INF and d[u] + c < d[v]:
                d[v] = d[u] + c
                if i == n-1 and v == n-1:
                    return 'inf'
    
    return -d[n-1]
    

N, M = map(int, sys.stdin.readline().split())
Edges = [None] * M

for i in range(M):
    ai, bi, ci = map(int, sys.stdin.readline().split())
    Edges[i] = (ai-1, bi-1, -ci)
    
ans = Bellmanford(N, Edges, 0)

print(ans)
S = input()

if S == SUN:
    print('7')

if S == MON:
    print('6')
    
if S == TUE:
    print('5')
    
if S == WED:
    print('4')
    
if S == THU:
    print('3')
    
if S == FRI:
    print('2')
    
if S == SAT:
    print('1')

### FIXED CODE ###

S = input()

if S == "SUN":
    print('7')

if S == "MON":
    print('6')
    
if S == "TUE":
    print('5')
    
if S == "WED":
    print('4')
    
if S == "THU":
    print('3')
    
if S == "FRI":
    print('2')
    
if S == "SAT":
    print('1')
N, A, B, C = map(int,input().split())
l = [int(input()) for i in range(N)]
inf = 10**9

def magic(cur, a, b, c):
    if cur == N:
        if min(a, b, c) > 0:
            return abs(a - A) + abs(b - B) + abs (c - C) - 30
        else:
            return inf
    
    ret0 = magic(cur+1, a, b, c)
    ret1 = magic(cur+1, a+l[cur], b, c) + 10
    ret2 = magic(cur+1, a, b+l[cur], c) + 10
    ret3 = magic(cur+1, a, b, c+l[cur]) + 10
    return min(ret0, ret1, ret2, ret3)

print(magic(ret0, ret1, ret2, ret3)

### FIXED CODE ###

N,A,B,C=map(int,input().split())
l=[int(input()) for i in range(N)]
inf=10**9
def magic(cur, a, b, c):
    if cur == N:
        if min(a, b, c) > 0:
            return abs(a - A) + abs(b - B) + abs (c - C) - 30
        else:
            return inf
    
    ret0 = magic(cur+1, a, b, c)
    ret1 = magic(cur+1, a+l[cur], b, c) + 10
    ret2 = magic(cur+1, a, b+l[cur], c) + 10
    ret3 = magic(cur+1, a, b, c+l[cur]) + 10
    return min(ret0, ret1, ret2, ret3)

print(magic(0, 0, 0, 0))
import sys
n = int(input())
now_time = 0

def finish_work(now_time, works):
    if len(works) == 0:
        print("Yes")
        sys.exit()
        return 0
    sums = sum([i[0] for i in works]) 
    maxs = max ([i[1] for i in works])
    if maxs < sums:
        return 0
    for index, i in enumerate(works):
        if now_time + i[0] <= i[1]:
            work_list = works.copy()
            work_list.pop(index)
            finish_work(now_time + i[0], work_list)

works = []

for i in range(n):
    a = list(map(int, input().split()))
    works.append(a)

for index, i in enumerate(works):
    
    if now_time + i[0] <= i[1]:
        work_list = works.copy()
        work_list.pop(index)
        finish_work(now_time + i[0], work_list)


print("No")

### FIXED CODE ###

n = int(input())
li = [list(map(int, input().split())) for _ in range(n)]
li.sort(key = lambda x : x[1])
t = 0
for i in li:
    t += i[0]
    if t > i[1]:
        print("No")
        break
else:
    print("Yes")
N = int(input())
S = input()
S = list(S)
K = S.copy()
T = S.copy()

tmp = [0 for _ in range(N)]

if S[0] == '.':
    tmp[0] = 1

for i in range(N-1):
    if S[i] == '.':
        tmp[i+1] = tmp[i] + 1
    else:
        tmp[i+1] = tmp[i]
  
res1 = 10 ** 9
for i in range(N):
    res1 = min( (i + 1) - tmp[i] + tmp[N-1] - tmp[i], res1)
        

b = 0
w = 0
for i in range(N):
    if K[i] == '#':
        b += 1
    else:
        w += 1

res3 = N - max(b, w)

print(min(res1, res2, res3))

### FIXED CODE ###

N = int(input())
S = input()
S = list(S)

tmp = [0 for _ in range(N+1)]

#if S[0] == '.':
   # tmp[0] = 1

for i in range(N):
    if S[i] == '.':
        tmp[i+1] = tmp[i] + 1
    else:
        tmp[i+1] = tmp[i]
  
res1 = 10 ** 9
for i in range(N):
    res1 = min((i+1) - tmp[i+1] + tmp[N] - tmp[i+1], res1)
        
b = 0
w = 0
for i in range(N):
    if S[i] == '#':
        b += 1
    else:
        w += 1

res3 = N - max(b, w)

print(min(res1, res3))
a, b =[int(x) for x in input().split()]
 
import numpy as np
n=a*b
A = np.array(a)
B = np.array(b)
if np.gcd(A, B) == 1:
  print(n)
else:
  for i in range(1, n+1):
      if i % a == 0 and i % b == 0 :
          print(i)
          break

### FIXED CODE ###

a, b = [int(x) for x in input().split()]
# a = [int(input()) for _ in range(m)]
# a = [int(x) for x in input().split()]

from fractions import gcd



print((a*b)//gcd(a, b))
n = int(input())
ac = wa = tle = re = 0
for i in range(n):
  s = input()
  if s = "AC":
    ac += 1
  elif s = "WA":
    wa += 1
  elif s = "TLE":
    tle += 1
  elif s = "RE":
    re += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x ", tle)
print("RE x", re)


### FIXED CODE ###

n = int(input())
ac = wa = tle = re = 0
for i in range(n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  elif s == "RE":
    re += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x ", tle)
print("RE x", re)
I=lambda:[int(i)for i in input().split()]
n,m=I()
P=I()
D={i:i for i in range(n)}
def U(x):
  if D[x]!=x:
    D[x]=U(D[x])
  return D[x]
for _ in [0]*m:
  x,y=I();D[U(x)]=U(y)
print(sum(U(i-1)==U(p)for i,p in enumerate(P)))



### FIXED CODE ###

from collections import defaultdict
import sys
sdin = sys.stdin.readline

class UnionFind:
    def __init__(self, node:int) -> None:
        self.n = node
        self.par = [i for i in range(self.n)]
        self.rank = [0 for i in range(self.n)]
        
    def find(self, x:int) -> int:
        if x == self.par[x]:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
        
    def unite(self, x:int, y:int) -> bool:
        if self.isSame(x,y):
            #print("x and y has already united")
            return False
        
        rx = self.find(x)
        ry = self.find(y)
        
        if self.rank[rx] < self.rank[ry]:
            self.par[rx] = ry
        else:
            self.par[ry] = rx
            
            if self.rank[rx] == self.rank[ry]:
                self.rank[rx] += 1
                
        return True
    
    def isSame(self, x:int, y:int) -> bool:
        return self.find(x) == self.find(y)

    

        
N, M = map(int, sdin().split())
P = list(map(int, sdin().split()))
XY = []
for i in range(M):
    XY.append(list(map(int, sdin().split())))


root_node = defaultdict(list)

uf = UnionFind(N)
for x,y in XY:
    x -= 1
    y -= 1
    uf.unite(x,y)

for i in range(N):
    uf.find(i)
    
par = uf.par

for i,root in enumerate(par):
    root_node[root].append(i)
    
ans = 0
for node_list in root_node.values():
    num_list = []
    for i in node_list:
        num_list.append(P[i]-1)
    
    ans += len(set(node_list)&set(num_list))
            
print(ans)
N,M = map(int,input().split())
l = list(map(int,input().split()))
if M <= N:
    print('0')
else:
    l.sort()
    li = []
    for i in range(M-1):
        difference  = abs(l[i]-l[i+1])
        li.append(difference)
    li.sort().reverse()
    dif = 0
    for i in range(N-1):
        dif += li[i]
    print(l[M-1]-l[0]-dif)

### FIXED CODE ###

N,M = map(int,input().split())
l = list(map(int,input().split()))
if M <= N:
    print('0')
else:
    l.sort()
    li = []
    for i in range(M-1):
        difference  = abs(l[i]-l[i+1])
        li.append(difference)
    li.sort()
    li.reverse()
    dif = 0
    for i in range(N-1):
        dif += li[i]
    print(l[M-1]-l[0]-dif)
string = input()
num = int(input())

count=1
out=string[0]

for i,s in zip([i for i in range(len(string))],string):
    if i != 0:
        if i%num == 0:
            out=out+string[i]

print(out)

### FIXED CODE ###

l = input().split()
if int(l[0])+int(l[1])==15:
    print('+')
elif int(l[0])*int(l[1]) ==15:
    print('*')
else:
    print('x')
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

acs = [0]*(N+1)
for i in range(N):
    acs[i+1] = acs[i]+A[i]
    if acs[i+1] > K:
        A = A[:i]
        acs = acs[:i]
        break
A = A[::-1]

bcs = [0]*(M+1)
for i in range(M):
    bcs[i+1] = bcs[i]+B[i]
    if bcs[i+1] > K:
        B = B[:i]
        bcs = bcs[:i]
        break
B = B[::-1]

lng = []
srt = []
if len(acs) >= len(bcs):
    lng = A
    srt = bcs[::]
else:
    lng = B
    srt = acs[::]

lcs = [0]*(len(lng)+1)
lcs[0] = K-sum(lng)
for i in range(len(lng)):
    lcs[i+1] = lcs[i]+lng[i]
lng = lcs

sidx = 0
if len(srt)>0:
    for i in range(len(srt)):
        if srt[i] < lng[i]: sidx = i
lidx = 0
if len(lng)>0:
    for i in range(len(lng)):
        if lng[i] < srt[sidx]: lidx = i

print(len(lng)+sidx-lidx-1)

### FIXED CODE ###

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

a, b = [0], [0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans, j = 0, M
for i in range(N+1):
    if a[i] > K: break
    while a[i] + b[j] > K:
        j -= 1
    ans = max(ans, i+j)
    
print(ans)
#121-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
import math
n=max(int(math.log(a,2)),int(math.log(b,2)))+1
al=[0 for i in range(n)]
bl=[0 for i in range(n)]
cl=[0 for i in range(n)]
for i in range(1,n):
    k=pow(2,i+1)
    al[i]=a%k
    bl[i]=b%k
    bou=k//2-1
    if al[i]<=bl[i]:
        if al[i]<=bou:
            if bl[i]<=bou:
                cl[i]=0
            else:
                cl[i]=0 if (bl[i]-bou)%2==0 else 1
        else:
            cl[i]=1 if (bl[i]-al[i])%2==0 else 0
    else:
        if bl[i]<=bou:
            if al[i]<=bou:
                cl[i]=0
            else:
                cl[i]=0 if (k-al[i])%2==0 else 1
        else:
            if al[i]<=bou:
                cl[i]=0 if (bl[i]-bou)%2==0 else 1
            else:
                cl[i]=0 if (k-al[i]+bl[i]-bou)%2==0 else 1
if a%2==0:
    if b%2==0:
        cl[0]=0 if ((b-a)//2)%2==0 else 1
    else:
        cl[0]=0 if (((b+1)-a)//2)%2==0 else 1
else:
    if b%2==1:
        cl[0]=1 if ((b-a)//2)%2==0 else 0
    else:
        cl[0]=1 if (((b-1)-a)//2)%2==0 else 0
        
ans=0
for i in range(n):
    ans+=cl[i]*pow(2,i)
print(ans)

### FIXED CODE ###

#121-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
a,b=IL()
import math
if a==0:
    if b==0:
        n=1
    else:
        n=int(math.log(b,2))+1
else:
    if b==0:
        n=int(math.log(a,2))+1
    else:
        n=max(int(math.log(a,2)),int(math.log(b,2)))+1
al=[0 for i in range(n)]
bl=[0 for i in range(n)]
cl=[0 for i in range(n)]
for i in range(1,n):
    k=pow(2,i+1)
    al[i]=a%k
    bl[i]=b%k
    bou=k//2-1
    if al[i]<=bl[i]:
        if al[i]<=bou:
            if bl[i]<=bou:
                cl[i]=0
            else:
                cl[i]=0 if (bl[i]-bou)%2==0 else 1
        else:
            cl[i]=1 if (bl[i]-al[i])%2==0 else 0
    else:
        if bl[i]<=bou:
            if al[i]<=bou:
                cl[i]=0
            else:
                cl[i]=0 if (k-al[i])%2==0 else 1
        else:
            if al[i]<=bou:
                cl[i]=0 if (bl[i]-bou)%2==0 else 1
            else:
                cl[i]=0 if (k-al[i]+bl[i]-bou)%2==0 else 1
if a%2==0:
    if b%2==0:
        cl[0]=0 if ((b-a)//2)%2==0 else 1
    else:
        cl[0]=0 if (((b+1)-a)//2)%2==0 else 1
else:
    if b%2==1:
        cl[0]=1 if ((b-a)//2)%2==0 else 0
    else:
        cl[0]=1 if (((b-1)-a)//2)%2==0 else 0
        
ans=0
for i in range(n):
    ans+=cl[i]*pow(2,i)
print(ans)
strs = []
for i in range(N):
    n = input()
    strs.append(n)

strs = sorted(strs)
strs = ''.join(strs)

print(strs)

### FIXED CODE ###

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

strs = []
for i in range(N):
    n = input()
    strs.append(n)

strs.sort()
print("".join(strs))
H, W = map(int, input().split())
campus = list(input() for i in range(W))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')


### FIXED CODE ###

H, W = map(int, input().split())
campus = list(input() for i in range(H))


def check_around(x, y):
    if 0 < y and campus[y - 1][x] == '#':
        return True
    elif 0 < x and campus[y][x - 1] == '#':
        return True
    elif x < W - 1 and campus[y][x + 1] == '#':
        return True
    elif y < H - 1 and campus[y + 1][x] == '#':
        return True
    return False


can = True
for y in range(H):
    for x in range(W):
        if campus[y][x] == '#':
            can = check_around(x, y)
            if not can:
                print('No')
                exit()
print('Yes')
a,b,c = map(str,input().split())

sum_distance = set(["a","b","c"])

if len(sum_distance) == 2:
    print("Yes)
else:
    print("No")

### FIXED CODE ###

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

s = set([a,b,c])

if len(s) == 2:
  print("Yes")
else:
  print("No")
from fraction import gcd
# from functools import reduce
# def gcd_list(numbers):
#     return reduce(math.gcd, numbers)

n=int(input())

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

left=[0]*(n+1)
right=[0]*(n+1)

for i in range(n):
    left[i+1]=gcd(left[i],a[i])
    right[n-i-1]=gcd(right[n-i],a[n-i-1])

# print(left)
# print(right)
last=[0]*n

for i in range(n):
    last[i]=(gcd(left[i],right[i+1]))


print(max(last))

### FIXED CODE ###

from fractions import gcd
# from functools import reduce
# def gcd_list(numbers):
#     return reduce(math.gcd, numbers)

n=int(input())

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

left=[0]*(n+1)
right=[0]*(n+1)

for i in range(n):
    left[i+1]=gcd(left[i],a[i])
    right[n-i-1]=gcd(right[n-i],a[n-i-1])

# print(left)
# print(right)
last=[0]*n

for i in range(n):
    last[i]=(gcd(left[i],right[i+1]))


print(max(last))
n,x,t - map(int,input().split())

from math import ceil
time = ceil(t/n) * x
print(time)


### FIXED CODE ###

n,x,t = map(int,input().split())

from math import ceil
time = ceil(n/x) * t
print(time)
from itertools import permutations 
inf=10**10
n, m, r1 = map(int, input().split())
r=list(map(int, input().split()))
abc=[list(map(int, input().split())) for _ in range(m)]
d=[[inf]*n for i in range(n)]
for i in range(n):
    d[i][i]=0
for ai, bi, ci in abc:
    d[ai-1][bi-1]=ci
    d[bi-1][ai-1]=ci
for k in range(n):
    for i in range(n):
        for j in range(i, n):
            d[i][j]=min(d[i][j], d[i][k]+d[k][j])
            d[j][i]=d[i][j]
p=list(permutations(r))
ans=inf
for pi in p:
    res=0
    for i in range(r1-1)
        res+=d[pi[i]-1][pi[I+1]-1]
    ans=min(ans, res)
print(ans)

### FIXED CODE ###

from itertools import permutations
N, M, R = map(int, input().split())
r = list(map(int, input().split()))
E = [list(map(int, input().split())) for _ in range(M)]
INF = 10 ** 9
d = [[INF for j in range(N)] for i in range(N)]
for i, j, c in E:
    d[i - 1][j - 1] = c
    d[j - 1][i - 1] = c
for k in range(N):
    for i in range(N - 1):
        for j in range(i, N):
            dk = d[i][k] + d[k][j]
            if d[i][j] > dk:
                d[i][j] = dk
                d[j][i] = dk
ans = 10 ** 9
for ri in permutations(r):
    x = 0
    for i in range(R - 1):
        x += d[ri[i] - 1][ri[i + 1] - 1]
    if ans > x:
        ans = x
print(ans)
N, A, B = map(raw_input().split())
print N*A if N*A < B else B

### FIXED CODE ###

N, A, B = map(int, input().split())
print(N*A if N*A < B else B)
a,b = map(input().split())

print(str(a*b)+" "+str(2*(a+b)))

### FIXED CODE ###

a,b = list(map(int, input().split()))
c = 2 * (a+ b)
d = a * b

print(str(d) + " " + str(c))
import sys
rl = sys.stdin.readline

rows = 3
cols = 3
a11,a12,a13 = [int(x) for x in rl().split(' ')]
a11,a12,a13 = [int(x) for x in rl().split(' ')]
a31,a32,a33 = [int(x) for x in rl().split(' ')]

n = int(rl())
b = []

for i in range(n):
    b.append(int(rl()))

#####################

card = [a11,a12,a13,a1,a22,a23,a31,a32,a33]

for num in b:
    for i in range(len(card)):
        if card[i] == num:
            card[i] = 0

def check(card):
    for y in range(rows):
        if all([card[y*rows+x] == 0 for x in range(cols)]):
            return True

    # col
    for x in range(cols):
        if all([card[y*rows+x] == 0 for y in range(rows)]):
            return True

    # diagonal
    if all([card[xy*rows+xy] == 0 for xy in range(rows)]):
            return True

    if all([card[xy*rows+cols-1-xy] == 0 for xy in range(rows)]):
            return True

    return False

if check(card):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import sys
rl = sys.stdin.readline

rows = 3
cols = 3
a11,a12,a13 = [int(x) for x in rl().split(' ')]
a21,a22,a23 = [int(x) for x in rl().split(' ')]
a31,a32,a33 = [int(x) for x in rl().split(' ')]

n = int(rl())
b = []

for i in range(n):
    b.append(int(rl()))

#####################

card = [a11,a12,a13,a21,a22,a23,a31,a32,a33]

for num in b:
    for i in range(len(card)):
        if card[i] == num:
            card[i] = 0


def check(card):
    for y in range(rows):
        if all([card[y*rows+x] == 0 for x in range(cols)]):
            return True

    # col
    for x in range(cols):
        if all([card[y*rows+x] == 0 for y in range(rows)]):
            return True

    # diagonal
    if all([card[xy*rows+xy] == 0 for xy in range(rows)]):
            return True

    if all([card[xy*rows+cols-1-xy] == 0 for xy in range(rows)]):
            return True

    return False


if check(card):
    print("Yes")
else:
    print("No")
num = int(input())
V = list(input().split(" "))
C = list(input().split(" "))
result = 0

for i in range(num):
    Vi = int(V[i])
    Ci = int(C[i])
    if Vi <= Ci:
        continue
    result += (Vi - Ci )

print(result)


### FIXED CODE ###

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

num = int(T/A)

print(num*B)