Harryxun/stf_run huggingface dataset:
def main():
    a,b,c,d,e,f= map(int,input().split())

    mizu=[]
    sato=[]

    x = int(f/100//a) +1
    y = int(f/100//b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a+j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = tokeru // c +1
    y = tokeru // d +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
    sato.remove(0)
    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f:
                if i//100*e >=j:
                    if tmp <= (100*j) / (i + j):
                        tmp = (100*j) / (i + j)
                        ans = [i+j,j]

    print(ans)


if __name__ == "__main__":
        main()


### FIXED CODE ###


def main():
    a,b,c,d,e,f= map(int,input().split())

    # 100gあたりE [g]溶ける
    # ビーカーにF [g]いれられる
    # 濃度は100*砂糖 / (水＋砂糖)


    mizu=[]
    sato=[]


    x = int(f/100/a) +1
    y = int(f/100/b) +1

    for i in range(x):
        for j in range(y):
            mizu.append(i*100*a + j*100*b)

    mizu = [i for i in mizu if i <= f]
    mizu = list(set(mizu))
    mizu.sort()

    tokeru = int(f/100) * e
    x = int(tokeru / c) +1
    y = int(tokeru / d) +1

    for i in range(x):
        for j in range(y):
            sato.append(i*c + j*d)

    sato = [i for i in sato if i < tokeru]
    sato = list(set(sato))
    sato.sort()
#    sato.remove(0)
#    mizu.remove(0)

    tmp =0

    for i in mizu:
        for j in sato:
            if i + j <= f and i + j !=0:
                if int(i/100)*e >=j:
                    if tmp <= (100*j) / (i + j):
                        tmp = (100*j) / (i + j)
                        ans = str(i+j) + " " + str(j)

    print(ans)


if __name__ == "__main__":
        main()
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

table = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
a = [table[i] for i in A]

# ちょうどi本のマッチ棒を使って、条件を満たす整数を作るときの最大桁数
INF = float('inf')
dp = [-INF] * (N + 1)
dp[0] = 0
cost = set(a)

for i in range(1, N + 1):
    for j in cost:
        if i - j >= 0 and dp[i] < dp[i - j] + 1:
            dp[i] = dp[i - j] + 1

answer = []
for i in A:
    while N:
        if dp[N] == dp[N - table[i]] + 1:
            answer.append(i)
            N -= table[i]
        else:
            break

print(''.join(map(str, answer)))

### FIXED CODE ###

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

table = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
a = [table[i] for i in A]

# ちょうどi本のマッチ棒を使って、条件を満たす整数を作るときの最大桁数
INF = float('inf')
dp = [-INF] * (N + 1)
dp[0] = 0
cost = set(a)

for i in range(1, N + 1):
    for j in cost:
        if i - j >= 0 and dp[i] < dp[i - j] + 1:
            dp[i] = dp[i - j] + 1

answer = []
for i in A:
    x = table[i]
    while N - x >= 0 and dp[N] == dp[N - x] + 1:
        answer.append(i)
        N -= x

print(''.join(map(str, answer)))
n = int(input())
s = input()
t = s
r = 0
l = 0
id=n-1
while t[id]=='(':
    r+=1
    id-=1
t = t[:id+1]
id = 0
while id<len(t) and t[id]==')':
    l+=1
    id+=1
t = t[id:]
if t.count('(')>t.count(')'):
    r+=t.count('(')-t.count(')')
else:
    l+=t.count(')')-t.count('(')
print('('*l+s+')'*r)

### FIXED CODE ###

n = int(input())
s = input()
r = 0
l = 0
cnt = 0
for i in s:
    if i==')':
        cnt+=1
        if cnt>0:
            cnt-=1
            l+=1
    else:
        cnt-=1
print(l*'('+s+')'*(-cnt))
def resolve():
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    n, x = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    M = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    mmin = min(M)

    reall = x - sum(M)

    cnt = n + int(reall / mmin)
 #   for i in M:
 #       if reall >= i:
 #           cnt += 1


    print(cnt)
resolve()

### FIXED CODE ###

def resolve():
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    n, x = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    M = [int(input()) for i in range(n)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    mmin = min(M)

    reall = x - sum(M)

    cnt = n + int(reall // mmin)

    print(cnt)


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

if math.fabs(x - a) > math.fabs(x - b):
  print("B")
else:
  print("A")


### FIXED CODE ###

import math

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

if math.fabs(x - a) > math.fabs(x - b):
  print("B")
else:
  print("A")
N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[0] * (W+1) for _ in range(N)]

for i in range(N):
    for j in range(1, W+1):
        if w[i] > j:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = max(dp[i-1][j], v[i]+dp[i-1][j-w[i]])

print(max(dp[N-1]))

### FIXED CODE ###

N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [0] + [float("inf")] * 10**5

for i in range(N):
    for j in range(10**5, v[i]-1, -1):
        dp[j] = min(dp[j], dp[j-v[i]] + w[i])

res = 0
for v, e in enumerate(dp):
    if e <= W:
        res = v

print(res)
import math
S = int(input())
m = 10 ** 9
y = S // m
x = S % y
print("{} 0 {} 0 0 {}".format(m, x, y))

### FIXED CODE ###

S = int(input())
m = 10 ** 9
x = (m-S%m)%m
y = (S+x)//m
print("0 0 {} 1 {} {}".format(m, x, y))
a,b,c,d=map(int, input().split())
 
while True:
	c=c-b
  	if c<=0:
  		print("Yes")
  		exit()
	a=a-d
  	if a<=0:
  		print("No")
  		exit()

### FIXED CODE ###


a, b, c, d = map( int, input().split() )
#print( a, b, c, d )
 
for i in range( 200 ):
    c = c - b
    if c <= 0:
        print( "Yes" )
        exit()
 
    a = a - d
    if a <= 0:
        print( "No" )
        exit()
k=int(input(''))
r=[]
def detr(n):
    sn=str(n)
    j=0
    for a in sn:
        j=j+1
    
    if j==1:
        return True

    ok=1
    for a in range(j-1):
        if int(sn[a])-int(sn[a+1])==0 or int(sn[a])-int(sn[a+1])==1 or int(sn[a])-int(sn[a+1])==-1:
            ok=ok*1
        else:
            ok=ok*0
            break
    
    if ok==1:
        return True
    else:
        return False

lis=[]
x=1
c=0
while len(lis)<k:
    if detr(x)==True:
        lis.append(x)
        if x>=10:
            c=c+1
    
    if c<=2:
        x=x+1
    else:
        c=0
        x=x+9

print(lis[-1])

### FIXED CODE ###

n,k=map(int,input('').split(' '))
s=0
h=0

n=n%k
while s==0:
    h=n
    n=n-k
    if n<0:
        n=n*(-1)
    if h>n:
        s=0
    else:
        s=1
        n=h

print(n)
N=input()
K=input()
X=input()
Y=input()

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

### FIXED CODE ###

N=int(input())
K=int(input())
X=int(input())
Y=int(input())

if N > K:
  print(K*X+(N-K)*Y)
else:
  print(N*X)
N = int(input())
zahyou = [list(map(int,input().split())) for i in range(N)]

H = 1
C_x = 0
C_y = 0

def height(C_x,C_y,x,y,h):
  H = h + abs(x-C_x) + abs(y-C_y)
  return H

def koud(C_x,C_y,H,x,y):
  h = H - abs(x-C_x) - abs(y-C_y)
  return max(h,0)
  
flag = False
for i in range(0,101):
  C_x = i
  for j in range(0,101):
    C_y = j
    memo = []
    for k in range(N):
      if zahyou[k][2] == 0:#高度が0のとき
        memo.append[k]
        continue
      if k == 0 :
        H = height(C_x,C_y,zahyou[k][0],zahyou[k][1],zahyou[k][2])
      else:
        if zahyou[k][2] != koud(C_x,C_y,H,zahyou[k][0],zahyou[k][1]):
          break
        else:
          continue
    else:
      for l in range(len(memo)):
        if zahyou[k][2] != koud(C_x,C_y,H,zahyou[k][0],zahyou[k][1]):
          break
        else:
          continue
      else:
        flag = True
        break
    if flag:
      break
  if flag:
    break

print(C_x,C_y,H)

### FIXED CODE ###

N = int(input())
zahyou = [list(map(int,input().split())) for i in range(N)]
 
H = -1
C_x = 0
C_y = 0
 
def height(C_x,C_y,x,y,h):
  H = h + abs(x-C_x) + abs(y-C_y)
  return H
 
def koud(C_x,C_y,H,x,y):
  h = H - abs(x-C_x) - abs(y-C_y)
  return h
 
flag = False
for i in range(0,101):
  C_x = i
  for j in range(0,101):
    C_y = j
    H = -1
    memo = []
    for k in range(N):
      if zahyou[k][2] == 0:#高度が0のとき
        memo.append(k)
        continue
      if H < 0:
        H = height(C_x,C_y,zahyou[k][0],zahyou[k][1],zahyou[k][2])
      else:
        if zahyou[k][2] != koud(C_x,C_y,H,zahyou[k][0],zahyou[k][1]):
          break
        else:
          continue        
    else:
      for l in range(len(memo)):
        if H <= height(C_x,C_y,zahyou[l][0],zahyou[l][1],zahyou[l][2]):
          continue
        else:
          break
      else:  
        flag = True
        break
    if flag:
      break
  if flag:
    break

print(C_x,C_y,H)
a,b,c = map(int,input().split())
if a == b and b == c:
    print(-1)
else:
    ans = 0
    while True:
        if a % 2 == 0 and b % 2 -= 0 and c % 2 == 0:
            ans += 1
            A = b / 2 + c / 2
            B = c / 2 + a / 2
            C = a / 2 + b / 2
            a = A
            b = B
            c = C
        else:
            break
    print(ans)

### FIXED CODE ###

a,b,c = map(int,input().split())
if a == b and b == c:
    if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        print(-1)
    else:
        print(0)
else:
    ans = 0
    while True:
        if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
            ans += 1
            A = b / 2 + c / 2
            B = c / 2 + a / 2
            C = a / 2 + b / 2
            a = A
            b = B
            c = C
        else:
            break
    print(ans)
# coding: utf-8
import os
import time
import re
import math

s=input()
print(180*(N-2))

### FIXED CODE ###

# coding: utf-8
import os
import time
import re
import math
 
N=int(input())
print(180*(N-2))
def sakujo();
seq1 = raw_input()
seq2 = raw_input()

a, b = len(seq1), len(seq2)
x1 = [0 for i in range(b+1)]
for i in range(a):
e1 = seq1[i]
x2 = x1+[]
for j in range(b):
if e1 == seq2[j]:
x1[j+1] = x2[j] + 1
elif x1[j+1] < x1[j]:
x1[j+1] = x1[j]
return x1[-1]


n=input()
for i in range(n):
def sakujo

### FIXED CODE ###

def longest():
    alps1 = raw_input()
    alps2 = raw_input()
    
    x, y = len(alps1), len(alps2)
    k = [0 for i in range(y+1)]
    for i in range(x):
        e1 = alps1[i]
        l = k+[]
        for j in range(y):
            if e1 == alps2[j]:
                k[j+1] = l[j] + 1
            elif k[j+1] < k[j]:
                k[j+1] = k[j]
 
    return k[-1]
    
n = input()
for i in range(n):
    print longest()
import math

def main():
    f = true
    r = []
    while f:
        n = int(input())
        if n == 0:
            break
        m = []
        for i in range(n):
            m.append(int(input()))
        r.append(math.floor((sum(m) - max(m) - min(m)/(n-2)))
    res = ''
    for j in r:
        res += str(j)
    print(j)


### FIXED CODE ###

import math

def main():
    r = []
    while True:
        n = int(input())
        if n == 0:
            break
        m = []
        for i in range(n):
            m.append(int(input()))
        r.append(math.floor((sum(m) - max(m) - min(m))/(n-2)))
    for j in r:
        print(j)

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

if (1 <= X <= 100) and (1 <= Y <= 100):
  if isinstance(( Y - X ) / 2, int) and isinstance((Y - X) / -2, int)
  	print("Yes")
  else:
    print("No")

### FIXED CODE ###

X, Y = map(int, input().split())
 
if (1 <= X <= 100) and (1 <= Y <= 100):
  kame = ( Y - (2 * X)) / 2
  turu = (Y - (4 * X)) / -2
  
  if kame.is_integer() and turu.is_integer() and kame >= 0 and turu >= 0:
  	print("Yes")
  else:
    print("No")
s=input()
if len(s)%2=0 and s == 'hi'*len(s)//2:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

string = input()
for i in range(len(string)):
    if i % 2 == 0:
        if string[i] == 'h':
            continue
        else:
            print('No')
            break
    elif i % 2 == 1:
        if string[i] == 'i':
            continue
        else:
            print('No')
            break
else:
    if len(string) % 2 == 1:
        print('No')
    else:
        print('Yes')
N=input()
ans=int(round(N/2.0)-1)
print(ans)

### FIXED CODE ###

import math
N=int(input())
ans=int(math.ceil(N/2.0)-1)
print(ans)
n = int(input())
s = input()

i = -1
c = 0

while True:
	i = s.find('ABC', i + 1)
	if i == -1:
		break
	c++
print(c)

### FIXED CODE ###

n = int(input())
s = input()

i = -1
c = 0

while True:
	i = s.find('ABC', i + 1)
	if i == -1:
		break
	c += 1
print(c)
from sys import stdin
input = stdin.buffer.readline

n = int(input())
*a, = map(int, input().split())
dp = [[-1] * 1001 for i in range(n + 1)]
dp[0][0] = 1000
for i in range(n):
	for j in range(1001):
		if dp[i][j] >= 0:
			if dp[i][j]:
				dp[i + 1][j + dp[i][j] // a[i]] = max(dp[i + 1][j + dp[i][j] // a[i]], dp[i][j] % a[i])
			dp[i + 1][0] = max(dp[i + 1][0], dp[i][j] + a[i] * j)
			dp[i + 1][j] = max(dp[i + 1][j], dp[i][j])
print(dp[n][0])


### FIXED CODE ###

from sys import stdin
input = stdin.buffer.readline

n = int(input())
*a, = map(int, input().split())
b = 1000
for i in range(n - 1):
	if a[i] < a[i + 1]:
		b = b // a[i] * a[i + 1] + b % a[i]
print(b)
import math
a,b= map(int,input().split())
print(a*b//math.gcd(a,b))


### FIXED CODE ###


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd (a, b)
a,b = map(int,input().split())
print(lcm(a,b))
a = input()
c = 0
x = []
for i in a:
	if i == 'R':
		c+=1
	if i == "S":
		x.append(c)	
      	c = 0
print(max(x))

### FIXED CODE ###

a = list(input())
c = 0
x = []
for i in a:
    
    if i == 'R':
        c += 1
    else:
        x.append(c)
        c = 0
    x.append(c)
print(max(x))
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
num = sum(p_list[0:K])
max = 0
index = 0
value = 0

for i in range(n - k):
    num = num + p_list[i + k] - p_list[i]
    if num > max:
        max = num
        index = i + 1

for i in range(k):
    value += (1 + p_list[index + i])/ 2

print(value)


### FIXED CODE ###

n, k = map(int, input().split())
p_list = list(map(int, input().split()))
num = sum(p_list[0:k])
max = 0
index = 0
value = 0

for i in range(n - k):
    num = num + p_list[i + k] - p_list[i]
    if num > max:
        max = num
        index = i + 1

for i in range(k):
    value += (1 + p_list[index + i])/ 2

print(value)
n = int(input())
print("Yes" if any((n - i*7) % 4 == 0 for i in range(n // 7 + 1) else "No")

### FIXED CODE ###

n = int(input())
print("Yes" if any((n - i*7) % 4 == 0 for i in range(n // 7 + 1)) else "No")
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]

from functools import lru_cache
@lru_cache(maxsize=None)
def fibo(n):
    if n in A:
        return 0
    elif n == 0 or n == 1:
        return 1
    return fibo(n-2) + fibo(n-1)

print(fibo(N) % 1000000007)

### FIXED CODE ###

N, M = map(int, input().split())
A = set([int(input()) for i in range(M)])
t = 10**9+7
import sys
sys.setrecursionlimit(500000)
from functools import lru_cache
@lru_cache(maxsize=None)
def fibo(n):
    if n in A:
        return 0
    elif n == 0 or n == 1:
        return 1
    return (fibo(n-2) + fibo(n-1)) % t
print(fibo(N) % t)
n,m=map(int,input().split())
lst=[list(map(int,input().split())) for i in range(m)]
x=[]
y=[]
for i in lst:
  if lst[0]==1:
    x+=[i[1]]
for i in lst:
  if lst[1]==n:
    y+=[i[0]]
ans='IMPOSSIBLE'
for i in x:
  if i in y:
    ans='POSSIBLE'
    break
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
lst=[list(map(int,input().split())) for i in range(m)]

x=[]
y=[]

for i in lst:
  if i[0]==1:
    x+=[i[1]]
    
for i in lst:
  if i[1]==n:
    y+=[i[0]]
    
ans='POSSIBLE'

if len(list(set(x)))+len(list(set(y)))==len(list(set(x+y))):
  ans='IMPOSSIBLE'
    
print(ans)
d,n = map(int,input().split())

tmp = []
for i in range(1,100):
    tmp.append(i*100**d)
print(tmp[n-1])

### FIXED CODE ###

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

tmp = []
for i in range(1,100):
    tmp.append(i*100**d)
tmp.append(101*100**d)
print(tmp[n-1])
import copy
S=list(input())
S1 = "".join(S)
T=list(input())
T1 = "".join(T)
F = ["?"]*len(T)
F1 = "".join(F)
l =[]
M =[]
index =[]
B = copy.deepcopy(S)
while -1<S1.find(F1):
    a = S1.find(F1)
    index.append(a)
    B[a] ="a"
    S1="".join(B)
S1 ="".join(S)
for i in range(len(S)-len(T)+1):
    if S[i]==T[0]:
        l.append(i)
if 0<len(l):
    for i in l:
        c = S[i:len(T)+i]
        while "?" in c:
            c[c.index("?")] = T[c.index("?")]
        if c==T:
            A = copy.deepcopy(S)
            A[i:len(T)+i] = c
            while "?"in A:
                A[A.index("?")]="a"
            M.append(A)

for i in range(len(S)-len(T)+1):
    if S[i] =="?":
        c = S[i:len(T)+i]
    while "?" in c:
        c[c.index("?")] = T[c.index("?")]
    if c==T:
        A = copy.deepcopy(S)
        A[i:len(T)+i] = c
        while "?"in A:
            A[A.index("?")]="a"
        M.append(A)
if 0<len(index):
    for i in index:
        A = copy.deepcopy(S)
        A[i:len(T)+i] = T
        while "?"in A:
            A[A.index("?")]="a"
        M.append(A)
if 0<len(M):
    M.sort()
    print("".join(M[0]))
else:
    print("UNRESTORABLE")

### FIXED CODE ###

import copy
S=list(input())
S1 = "".join(S)
T=list(input())
T1 = "".join(T)
F = ["?"]*len(T)
F1 = "".join(F)
l =[]
M =[]
index =[]
B = copy.deepcopy(S)
for i in range(len(S)-len(T)+1):
    A = copy.deepcopy(S)
    c = A[i:len(T)+i]
    while "?" in c:
        c[c.index("?")] = T[c.index("?")]
    if c==T:
        A = copy.deepcopy(S)
        A[i:len(T)+i] = c
        while "?"in A:
            A[A.index("?")]="a"
        M.append(A)
if 0<len(M):
    M.sort()
    print("".join(M[0]))
else:
    print("UNRESTORABLE")
n,a,b=map(int, input().split())
n,a,b=map(int, input().split())
some=[]
for i in range(1,n+1):
    if a<=sum(map(int, list(str(i))))<=b:
        some.append(i)
print(sum(some))


### FIXED CODE ###

n,a,b=map(int, input().split())
some=[]
for i in range(1,n+1):
    if a<=sum(map(int, list(str(i))))<=b:
        some.append(i)
print(sum(some))
a = int(input())

if a % 2 == 1: print( ((a-1)/2 + 1)/a )
else: print 0.5

### FIXED CODE ###

a = int(input())

if a % 2 == 1: print( ((a-1)/2 + 1)/a )
else: print(0.5)
N,I=map(it,input().split())
print(N-I+1)

### FIXED CODE ###

N,I=map(int,input().split())
print(N-I+1)
r, c = map(int, input().split())
matrix = [[0 for i in range(c+1)] for j in range(r+1)]
for i in range(r):
    a = list(map(int, input().split()))
    for j in range(c):
        matrix[i][j] = a[j]
    matrix[i][c] = sum(a)
for l in range(c+1):
    for m in range(r):
        matrix[r][l] += matrix[m][l]

for cv in range(r+1):
    for fv in range(c+1):
        print(matrix[cv][fv], end='')
        if fv != c:
        print(" ", end='')
    print()


### FIXED CODE ###

r, c = map(int, input().split())
matrix = [[0 for i in range(c+1)] for j in range(r+1)]
for i in range(r):
    a = list(map(int, input().split()))
    for j in range(c):
        matrix[i][j] = a[j]
    matrix[i][c] = sum(a)
for l in range(c+1):
    for m in range(r):
        matrix[r][l] += matrix[m][l]

for cv in range(r+1):
    for fv in range(c+1):
        print(matrix[cv][fv], end='')
        if fv != c:
            print(" ", end='')
    print()
d = [0, 1, 0, -1]
def f(x, y, n, m):
    if m[x][y] == "#" or m[x][y] == " ":
        return
    if m[x][y] == "." or m[x][y] > n:
        m[x][y] = n
        for i in xrange(4):
            f(x+d[i], y+d[i+1&3], n+1, m)

h, w = map(int, raw_input().split())
m = list()
m.append([" " for _ in xrange(w+2)])
for _ in xrange(h):
    m.append([" "]+list(raw_input())+[" "])
m.append([" " for _ in xrange(w+2)])
dat = len(filter(lambda x:x==".", [i for j in m for i in j]))
f(1, 1, 1, m)
print dat-m[h][w]


### FIXED CODE ###

from Queue import Queue
d = [0, 1, 0, -1]
h, w = map(int, raw_input().split())
m = list()
m.append(["#" for _ in xrange(w+2)])
for _ in xrange(h):
    m.append(["#"]+list(raw_input())+["#"])
m.append(["#" for _ in xrange(w+2)])
dat = len(filter(lambda x:x==".", [i for j in m for i in j]))

q = Queue()
q.put((1,1,1))

while not q.empty():
    xy = q.get()
    if not m[xy[0]][xy[1]] == ".":
        continue
    m[xy[0]][xy[1]] = xy[2]
    for i in xrange(4):
        e = (xy[0]+d[i], xy[1]+d[i+1&3], xy[2]+1)
        if m[xy[0]+d[i]][xy[1]+d[i+1&3]] == ".":
            q.put(e)

try:
    print dat-m[h][w]
except:
    print -1
N, K = map(int, input().split())
ANS = 0
Mylist = list(map(int, input().split()))
for i in range(N):
  if Mylist[i] >= K:
   	ANS += 1
print(ANS)

### FIXED CODE ###

N = int(input())
if N%2 == 1:
  print((N+1)/2/N)
else:
  print(1/2)
N, M = map(int, input().split())
s = [list(map(int, input().spllit())) [1:] for i in range(M)]
p = list(map(int, input().split()))
total = 0
j = 0
for i in range(2 ** N):
  now = format(i, 'Nb')
  for k in range(M):
    tmp = 0
    for l in s[k]:
      tmp += int(now[l-1])
    if tmp % 2 == p[k]:
      j += 1
  if j == M :
    total += 1
  j = 0
print(total)


### FIXED CODE ###

n, m = map(int, input().split())
switch = []
for i in range(m):
    switch.append(list(map(int, input().split())))
p = list(map(int, input().split()))

ans = 0
for i in range(2**n):
    i = format(i, "0{}b".format(n))
    flag = 1
    for j in range(m):
        count = 0
        for k in range(switch[j][0]):
            if i[switch[j][k+1]-1] == "1":
                count += 1
        if count % 2 == p[j]:
            continue
        else:
            flag = 0
            break
    if flag == 1:
        ans += 1
print(ans)
X,N = map(int,input().split())
P = list(map(int,input().split()))

#リストを作る
all_l = [i for i in range(0,101)]

#Pの数値を消去
for p in P:
    all_l.remove(p)
    
#全探索
kouho = x
for i in range(200):
    kouho1 = x-i
    kouho2 = x+i
    if kouho1 not in P:
        print(x-i)
        break
    elif kouho2 not in P:

### FIXED CODE ###

X, N = map(int, input().split())
p = list(map(int, input().split()))
 
ans = 0
for i in range(1, 102):
    if abs(X - i) < abs(X - ans) and i not in p:
        ans = i
print(ans)
import fractions
import copy

def gcd_list(numbers):
    ans = numbers[0]
    for i in range(1,n-1):
        ans = fractions.gcd(ans,numbers[i])
    return ans
  
n = int(input())
a = list(map(int,input().split()))
a2 = copy.deepcopy(a)
res = []
for i in range(0,n):
    a2.pop(i)
    res.append(gcd_list(a2))
    a2 = copy.deepcopy(a)
print(max(res))

### FIXED CODE ###

a,b,t=map(int,input().split());print(int(t/a)*b)