Harryxun/stf_run huggingface dataset:
N = int(input())
A = list(map(int,input().split()))
ans = 0

if A in 0:
  print(0)
else:
  while N > i:
  	if ans > 10**18:
    	print(-1)
        exit()
    else:
      ans *= A[i]
print(ans)

### FIXED CODE ###

##169

##B
N = int(input())
A = list(map(int,input().split()))
ans = 1
i=0
if 0 in A:
  print(0)
else:
  while N > i:
    if ans <= 10**18:
        ans *= A[i]
        i += 1
    else:
        ans = -1
        break
  
  if ans > 10**18:
        print(-1)
  else:
    print(ans)
N = int(input())
s = [input() for i in range(N)]
memo = []

for i in range(s):
    r = s.random.choice()
    if r not in memo:    
        memo.append(r)    

print(len(memo))    

### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]

print(len(set(s)))
R = 3
C = 3
matrix = [] 
print("Enter the entries rowwise:") 
 
for i in range(R):         
    a =[] 
    for j in range(C):  
         a.append(int(input())) 
    matrix.append(a) 
  
# For printing the matrix 
for i in range(R): 
    for j in range(C): 
        print(matrix[i][j], end = " ") 
    print() 

i= int(input("Enter: "))
if i in matrix:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

row1 = list(map(int,input().split()))
row2 = list(map(int,input().split()))
row3 = list(map(int,input().split()))
n = int(input())
arr = []
for i in range(n):
    temp = int(input())
    arr.append(temp)
#
if row1[0] in arr and row1[1] in arr and row1[2] in arr or row2[0] in arr and row2[1] in arr and row2[2] in arr or row3[0] in arr and row3[1] in arr and row3[2] in arr:
    print("Yes")
    exit()
elif row1[0] in arr and row2[0] in arr and row3[0] in arr or row1[1] in arr and row2[1] in arr and row3[1] in arr or row1[2] in arr and row2[2] in arr and row3[2] in arr:
    print("Yes")
    exit()
elif row1[0] in arr and row2[1] in arr and row3[2] in arr or row1[2] in arr and row2[1] in arr and row3[0] in arr:
    print("Yes")
    exit()
else:
    print("No")
S = int(input())
h = int(S / (60 * 60))
m = int(S / 60) % 60
S = S % 60

print('{}:{}:{}'.format(h,m,s))

### FIXED CODE ###

S = int(input())
h = int(S / (60 * 60))
m = int(S / 60) % 60
s = S % 60

print('{}:{}:{}'.format(h,m,s))
from math import gcd
from functools import reduce

n=int(input());Alist=list(map(int,input().split()))

def gcd_L(numbers):
    return reduce(gcd, numbers)

M_list = []
for i in range(n):
    alist = Alist[:i] + Alist[i+1:]
    M_list.append(gcd_L(alist))

print(max(M_list))

### FIXED CODE ###

a,b,t = map(int,input().split())
print(0 if a>t else (t//a)*b)
a = [int(input()) for i in range(3)]

if a[0] == 2:
  print(a[1] + a[2])
  
else:
  print('Hello World')

### FIXED CODE ###

N = int(input())

if N == 1:
  print('Hello World')
  
elif N == 2:
  print(int(input()) + int(input()))
print(abs(-(N%1000)))

### FIXED CODE ###

print(abs((-int(input())%1000)))
def func(long n):
    if n % 2 == 0:
        return n / 2
    else:
        return 3*n + 1

s = int(input())

data = set()
data.add(s)
for i in range(1000010):
    l = len(data)
    val = func(s)
    data.add(val)
    if l == len(data):
        print(i+2)
        break
    s = val


### FIXED CODE ###

def func(n):
    if n % 2 == 0:
        return n / 2
    else:
        return 3*n + 1

s = int(input())
data = set()
data.add(s)
for i in range(1000010):
    l = len(data)
    val = func(s)
    data.add(val)
    if l == len(data):
        print(i+2)
        break
    s = val
n=int(input())
num6=6
num9=9
while num6<=n:
  l.append(num6)
  num6*=6
while num9<=n:
  l.append(num9)
  num9*=9
count=[0,1,2,3,4,5,1,2,3,1,2,3]
for i in range(12,n+1):
  min=100000
  for j in l:
    if i-j<0:
      pass
    else:
      if min>count[i-j]+1:
        min=count[i-j]+1
  count.append(min)
print(count[n])

### FIXED CODE ###

n=int(input())
l6=[]
l9=[]
num6=6
num9=9
while num6<=n:
  l6.append(num6)
  num6*=6
while num9<=n:
  l9.append(num9)
  num9*=9
count=[0,1,2,3,4,5,1,2,3,1,2,3]
for i in range(12,n+1):
  min=100000
  for j in l6:
    if i-j<0:
      pass
    else:
      if min>count[i-j]+1:
        min=count[i-j]+1
  for j in l9:
    if i-j<0:
      pass
    else:
      if min>count[i-j]+1:
        min=count[i-j]+1
  count.append(min)
print(count[n])
I, O, T, J, L, S, Z = map(int, input().split())
k0 = 0
k0 += (I//2)*2
k0 += (J//2)*2
k0 += (L//2)*2

k1 = 0
if I >= 1 and J >= 1 and L >= 1:
    k1 = 0
    k += 3
    I -= 1
    J -= 1
    L -= 1
    k1 += (I//2)*2
    k1 += (J//2)*2
    k1 += (L//2)*2

k = max(k0, k1)
k += O
print(k)

### FIXED CODE ###

I, O, T, J, L, S, Z = map(int, input().split())
k0 = 0
k0 += (I//2)*2
k0 += (J//2)*2
k0 += (L//2)*2

k1 = 0
if I >= 1 and J >= 1 and L >= 1:
    k1 = 0
    k1 += 3
    I -= 1
    J -= 1
    L -= 1
    k1 += (I//2)*2
    k1 += (J//2)*2
    k1 += (L//2)*2

k = max(k0, k1)
k += O
print(k)
import re
p='A?KIHA?BA?RA?$'
s=raw_input()
print['NO', 'YES'][re.match(p,s)!=None]

### FIXED CODE ###

S = input()
OK = False
if S=='KIHBR':
    OK = True
elif S=='KIHBRA':
    OK = True
elif S=='KIHBAR':
    OK = True
elif S=='KIHBARA':
    OK = True
elif S=='KIHABR':
    OK = True
elif S=='KIHABRA':
    OK = True
elif S=='KIHABAR':
    OK = True
elif S=='KIHABARA':
    OK = True
elif S=='AKIHBR':
    OK = True
elif S=='AKIHBRA':
    OK = True
elif S=='AKIHBAR':
    OK = True
elif S=='AKIHBARA':
    OK = True
elif S=='AKIHABR':
    OK = True
elif S=='AKIHABRA':
    OK = True
elif S=='AKIHABAR':
    OK = True
elif S=='AKIHABARA':
    OK = True
print('YES' if OK else 'NO')
#!/usr/bin/env python
# coding: utf-8
#

import copy

            
    
def main(n, k, l):
    cost_l = []
    if k == 1:
        print(min(l))
        return
    
    for i in range(n - k):
        mae = i
        ato = i + k - 1
        if l[mae] * l[ato] < 0:
            cost_l.append(min(- l[mae] * 2 + l[ato], - l[mae] + l[ato] * 2))
        elif l[mae] >= 0:
            cost_l.append(l[ato])
        elif l[ato] <= 0:
            cost_l.append(-l[mae])
            
    print(min(cost_l))

    
    
if __name__ == '__main__':
    try:
        n, k = list(map(int,input().strip().split(" ")))
        l = list(map(int,input().strip().split(" ")))
        main(n, k, l)
    except EOFError:
        pass


### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8
#

import copy

            
    
def main(n, k, l):
    cost_l = []

    if k == 0:
        print(0)
        return
    
    if k == 1:
        t = [abs(l[i]) for i in range(len(l)) ]
        print(min(t))
        return
    
    for i in range(n - k + 1):
        mae = i
        ato = i + k - 1
        if l[mae] * l[ato] < 0:
            cost_l.append(min(- l[mae] * 2 + l[ato], - l[mae] + l[ato] * 2))
        elif l[mae] >= 0:
            cost_l.append(l[ato])
        elif l[ato] <= 0:
            cost_l.append(-l[mae])
            
    print(min(cost_l))

    
    
if __name__ == '__main__':
    try:
        n, k = list(map(int,input().strip().split(" ")))
        l = list(map(int,input().strip().split(" ")))
        main(n, k, l)
    except EOFError:
        pass
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if len(S)%2==0:
        pass
    else:
        if S==inv:
            i+=1
            N=int((len(S)-1)/2)
        for x in range(N-1):
            if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
                pass
            else:
                j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')
            

### FIXED CODE ###

class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if S==inv:
        i+=1
        
    N=int((len(S)-1)/2)
    for x in range(N-1):
        if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
            pass
        else:
            j+=1
                
    if j==0 and i==1:
        print('Yes')
    else:
        print('No')
s=input()
for i in range(3):
  if s[i]=='1':
    s[i]='9'
  else:
    s[i]='1'
print(s)

### FIXED CODE ###

print(input().replace('1','a').replace('9','1').replace('a','9'))
N,M=map(int,input().split())
list1=[]
for i in range (M):
    list1 += list(map(int,input().split()))
for j in range(1,N+1):
 print (list1.count(j))

### FIXED CODE ###

a,b,c=map(int, input().split())
if a<=c and c<=b:
 print ('Yes')
else:
 print('No')
x = int(input())
if x == 2:
  print(2)
  
else:
  var = x
  while True:
    for _ in range(2,var):
      if var%_ != 0:
        ind = True
      else:
        ind = False
        break
    if ind == True:
      break  
    else:
      var+=1  
print(var)
      

### FIXED CODE ###

x = int(input())
if x == 2:
  print(2)
  
else:
  var = x
  while True:
    for _ in range(2,var):
      if var%_ != 0:
        ind = True
      else:
        ind = False
        break
    if ind == True:
      break  
    else:
      var+=1  
  print(var)
sum=0
max=0
list=[int(input()) for i in range(5)]
for i in list:
  x = int(input()）
  y = -(-x//10)*10
  sum+=y
  max=(y-x, max)
print(sum-max)

### FIXED CODE ###

X=[int(input()) for i in range(5)]
Y=[]
for x in X:
  Y.append(-(-x//10)*10-x)
print(sum(X)+sum(Y)-(max(Y)))
one = int(input())
zero = int(input())
ng_one = int(input())
card = int(input())

card_list = []
for i in range(one):
    card_list.append(1)
for i in range(zero):
    card_list.append(0)
for i in range(ng_one):
    card_list.append(-1)

print(sum(card_list[:card]))

### FIXED CODE ###

one,zero,ng_one,card = map(int, input().split())

if card < one:
    print(card)
elif card <= one+zero:
    print(one)
else:
    print(one - (card - one - zero))
x,n = map(int,input().split())
if n:
    p = set(map(int,input().split()))
mini = float('inf')
ans = float('inf')
for i in range(1,102):
    if i not in p:
        if abs(x-i)<mini:
            mini = abs(x-i)
            ans = i
        elif abs(x-i)==mini and ans>i:
            ans=i
print(ans)

### FIXED CODE ###

x,n = map(int,input().split())
p = set()
if n:
    p = set(map(int,input().split()))
mini = float('inf')
ans = float('inf')
for i in range(-400,400):
    if i not in p:
        if abs(x-i)<mini:
            mini = abs(x-i)
            ans = i
        elif abs(x-i)==mini and ans>i:
            ans=i
print(ans)
N, K = map(int, input().split())

print(min(N%K, abs(N%K - K))

### FIXED CODE ###

N, K = map(int, input().split())
print(min(N%K, abs(N%K - K)))
N = int(input())
A = list(int(input()) for i in range(N))
ans = A[0]
for i in range(N):
    stor = A.pop(i)
    for n in range(N-1):
        if ans < A[i]:
            ans = A[i]
    A.insert(i,stor)
    print(ans)
    ans = A[0]

### FIXED CODE ###

N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
B= sorted(A)

for i in range(N):
    if A[i] == B[N-1]:
        ans = B[N-2]
        print(ans)
    else:
        print(B[N-1])
a, b, c =(int(x) for x in input().split())
print(str(a+b+c))

### FIXED CODE ###

a =input()
count = print(str(a.count('1')))
n,k = map(int, input().split())
s = list(input())

s[k] = s[k-1].lower()

print("".join(s))

### FIXED CODE ###

n,k = map(int, input().split())
s = list(input())

s[k-1] = s[k-1].lower()

print("".join(s))
def main():
A, B = map(int, input().split())
 print(A-2*B) if A > 2*B else print(0)
  
main()

### FIXED CODE ###

def main():
 A, B = map(int, input().split())
 print(A-2*B) if A > 2*B else print(0)
  
main()
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(10**10)

def operation(s,memo=-1,ans=0):
    if len(s) <= 0:
        return ans
    elif s[0] == memo == "0": #変えるパターン
        return operation(s[1:],"1",ans+1)
    elif s[0] == memo == "1": #変えるパターン
        return operation(s[1:],"0",ans+1)
    else:
        return operation(s[1:],s[0],ans)

def solve(s):
    return min(operation(s,"0"),operation(s,"1"))

def main():
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3

import sys
sys.setrecursionlimit(10**6)

def operation(s,f):
    c = 0
    for i in range(len(s)):
        if (s[i] == f and i % 2 == 1) or (s[i] != f and i % 2 == 0):
            c += 1
    return c

def solve(s):
    return min(operation(s,"0"),operation(s,"1"))

def main():
    S = input()
    print(solve(S))


if __name__ == '__main__':
    main()
A, B = [int(s) for in input().split(' ')]

if A % B:
  print(A + B)
else:
  print(B - A)

### FIXED CODE ###

A, B = [int(s) for s in input().split(' ')]

if B % A == 0:
  print(A + B)
else:
  print(B - A)
A, B, C, D = map(int, input().split())
 
while true:
  if C - B <= 0:
    print('Yes')
    break
  else:
    C = C - B
  if A - D <= 0:
    print('No')
    break
  else:
    A = A - D

### FIXED CODE ###

A, B, C, D = map(int, input().split())
 
while True:
  if C - B <= 0:
    print('Yes')
    break
  else:
    C = C - B
  if A - D <= 0:
    print('No')
    break
  else:
    A = A - D
SA = input()
SB = input()
SC = input()

pointer = SA[0]
SA = SA[1:]
d = {'a': SA, 'b': SB, 'c': SC}

while True:
    tmp = d[pointer][0]
    d[pointer] = d[pointer][1:]
    pointer = tmp
    if d[pointer] == '':
        ans = pointer
        break

print(ans.upper())

### FIXED CODE ###

SA = input()
SB = input()
SC = input()

pointer = SA[0]
SA = SA[1:]
d = {'a': SA, 'b': SB, 'c': SC}

while True:
    if d[pointer] == '':
        ans = pointer
        break
    tmp = d[pointer][0]
    d[pointer] = d[pointer][1:]
    pointer = tmp

print(ans.upper())
N = int(input())
an = list(map(int,input().split()))
solve = []

ans = 0
maxnum = 0

for i in range(1,N):
    if maxnum < an[i]:
        ans += max(an[maxnum:i+1]) - an[i]
        maxnum = an[i]
    if maxnum >= an[i]:
        ans += maxnum - an[i]
print(ans)

### FIXED CODE ###

N = int(input())
an = list(map(int,input().split()))
solve = []

ans = 0
maxnum = 0

for i in range(N):
    maxnum = max(maxnum,an[i])
    ans += maxnum - an[i]
print(ans)
n, k = map(int, input().split())
s = input()
s += '0'
s = '0' + s

t = []
accum_mode = False
l = r = 0

for i in range(1, n + 1):
    if s[i - 1] == '0' and s[i] == '1':
        l = i
    if s[i] == '1' and s[i + 1] == '0':
        r = i
        t.append((l, r))

res = 0

if k < len(t):
    for i in range(len(t) - k):
        tmp = t[i + k][1] - t[i][0]
        res = max(res, tmp)
    if t[0][0] != 1:
        tmp = t[k - 1][1] - 1
        res = max(res, tmp)
else:
    for i in range(len(t)):
        res = t[-1][1] - t[0][0]
    if t[0][0] != 1:
        tmp = t[min(k, len(t))-1][1] - 1
        res = max(res, tmp)

print(res + 1)

### FIXED CODE ###

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

t = []
l = r = 0

for i in range(1, n + 1):
    if s[i - 1] == '0' and s[i] == '1':
        l = i
    if s[i] == '1' and s[i + 1] == '0':
        r = i
        t.append((l, r))

if len(t) > 0:
    res = 0

    if k < len(t):
        for i in range(len(t) - k):
            tmp = t[i + k][1] - t[i][0]
            res = max(res, tmp)
        if t[0][0] != 1:
            tmp = t[k - 1][1] - 1
            res = max(res, tmp)
        if t[-1][1] != n:
            tmp = n - t[-k][0]
            res = max(res, tmp)
    else:
        for i in range(len(t)):
            res = t[-1][1] - t[0][0]
        if t[0][0] != 1:
            tmp = t[min(k, len(t))-1][1] - 1
            res = max(res, tmp)
        if t[-1][1] != n:
            tmp = n - t[-min(k,len(t))][0]
            res = max(res, tmp)

    print(res + 1)
else:
    print(n)
a = [1,2,3]- int(input())
print(list(a-int(input()))[0])

### FIXED CODE ###

X = {1,2,3}
a = {int(input())}
b = {int(input())}
print(list(X-a-b)[0])
import sys
#from itertools import combinations, permutations, product, combinations_with_replacement, accumulate
#from heapq import heapify, heappop, heappush, heappushpop
#from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from math import sqrt, log, floor, ceil, factorial, cos, sin, pi, gcd
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
INF = float('inf')
LINF = 2**63-1
NIL = -LINF
MOD = 10**9+7
MGN = 4
def II(): return int(input())
def IF(): return float(input())
def IS(): return str(input())
def ILCI(n: int): return [II() for _ in range(n)]
def ILCF(n: int): return [IF() for _ in range(n)]
def ILI(): return list(map(int, input().split()))
def ILLI(n: int): return [[int(j) for j in input().split()] for i in range(n)]
def ILF(): return list(map(float, input().split()))
def ILLF(n: int): return [[float(j) for j in input().split()] for i in range(n)]
def LTOS(lst: list, sep: str = ' '): return sep.join(map(str, lst))
def DEC(lst: list): return list(map(lambda x: x-1, lst))
def INC(lst: list): return list(map(lambda x: x+1, lst))


def main():
    S = IS()

    ans = "Yes"
    if S[0] == S[1] and S[1] == S[2]:
        ans = "No"
    
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
INF = float('inf')
LINF = 2**63-1
NIL = -LINF
MOD = 10**9+7
MGN = 4
def II(): return int(input())
def IF(): return float(input())
def IS(): return str(input())
def ILCI(n: int): return [II() for _ in range(n)]
def ILCF(n: int): return [IF() for _ in range(n)]
def ILI(): return list(map(int, input().split()))
def ILLI(n: int): return [[int(j) for j in input().split()] for i in range(n)]
def ILF(): return list(map(float, input().split()))
def ILLF(n: int): return [[float(j) for j in input().split()] for i in range(n)]
def LTOS(lst: list, sep: str = ' '): return sep.join(map(str, lst))
def DEC(lst: list): return list(map(lambda x: x-1, lst))
def INC(lst: list): return list(map(lambda x: x+1, lst))


def main():
    S = IS()

    ans = "Yes"
    if S[0] == S[1] and S[1] == S[2]:
        ans = "No"
    
    print(ans)


if __name__ == '__main__':
    main()
from math import factorial

def calc_nCr(n, r):
    return int(factorial(n) / (factorial(r) * factorial(n - r)))
def count_patterns(stairs):
    if stairs == 0 or stairs == 1:
        return 1
    max_double_num = int(stairs/2)
    combs = [None]*(max_double_num+1)
    for i in range(max_double_num+1):
        double = i
        single = stairs - double*2
        n = double + single
        r = double
        nCr = calc_nCr(n, r)
        combs[i] = nCr
    return sum(combs) % MOD
  
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]

MOD = 1_000_000_007
now = 0
total = 1

for broken in a:
    if broken <= now:
        print(0)
        break
    total = (total * count_patterns(broken-now-1)) % MOD
    now = broken + 1
else:
    total = (total * count_patterns(N-now)) % MOD
    print(total)

### FIXED CODE ###

def main():
    MOD = 1000000007
    N, M = map(int, input().split())
    a = [int(input()) for _ in range(M)]
    table = [1]*(N+1)
    for broken in a:
        table[broken] = 0
    table[1] = table[0] * table[1]
    if N > 1:
        for n in range(2, N+1):
            table[n] = ((table[n-2] + table[n-1]) * table[n]) % MOD
    print(table[-1])
main()
s = list(map(int, input().split()))
N = s[0]
A = s[1]
B = s[2]

if abs(A-B) % 2 == 0:
  print(int(abs(A-B) / 2))
elif abs(A-B) % 2 != 0:

### FIXED CODE ###

s = list(map(int, input().split()))
N = s[0]
A = s[1]
B = s[2]

if (B - A) % 2 == 0:
  print((B - A) // 2)
else:
  print(min(A - 1,N - B) +  1 + (B - A - 1) // 2)
import sys
import os
from collections import deque

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")

INF = float("inf")

H,W = LI()
C = LI()
D = LI()
maze = [list(_S()) for i in range(H)]

def bfs():
    # すべてのマスを INF で初期化
    d = [[INF] * W for i in range(H)]
    
    sx = C[0]-1
    sy = C[1]-1
    gx = D[0]-1
    gy = D[1]-1

    # スタート地点をキューに入れ、ワープ数を0にする
    que = deque([])
    que.append((sx, sy))
    d[sx][sy] = 0

    # ワープ対象
    que2 = deque([])

    # 移動4方向のベクトル
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]

    # ワープのベクトル
    dx2 = [-2, -2, -2, -2, -2, -1, -1, -1, -1,  0, 0, 1, 1,  1,  1, 2, 2, 2,  2, 2]
    dy2 = [-2, -1,  0,  1,  2, -2, -1,  1,  2, -2, 2, 2, 1, -1, -2, 2, 1, 0, -1, -2]

    while que: 
        while que:
            p = que.popleft()       
            # 取り出してきた状態がゴールなら探索をやめる
            if p[0] == gx and p[1] == gy:
                ans = d[p[0]][p[1]]
                print(ans)
                exit()
            que2.append((p[0], p[1]))
            # 移動4方向をループ
            for i in range(4):
                # 移動した後の点を (nx, ny) とする
                nx = p[0] + dx[i]
                ny = p[1] + dy[i]

                # 移動可否判定、d[nx][ny] == INF であれば訪れたことがない
                if 0 <= nx < H and 0 <= ny < W and maze[nx][ny] != "#" and d[nx][ny] == INF:
                    # 移動できるならキューに入れ、その点のワープ回数を p までのワープ回数で確定する
                    que.append((nx, ny))
                    d[nx][ny] = d[p[0]][p[1]]
                    
        while que2:
            # キューの先頭を取り出す
            p = que2.popleft()
            for i in range(20):
            # for dxi in range(-2,3):
            #     for dyi in range(-2,3):
                nx = p[0] + dx2[i]
                ny = p[1] + dy2[i]
                if 0 <= nx < H and 0 <= ny < W and maze[nx][ny] != "#" and d[nx][ny] == INF:
                    # 移動できるならキューに入れ、その点のワープ回数を p からのワープ回数 +1 で確定する
                    que.append((nx, ny))
                    d[nx][ny] = d[p[0]][p[1]]+1  
        # print('after que2: ',d)  
    return

bfs()
print(-1)

### FIXED CODE ###

import math
import numpy as np
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353    

# N = I()
N,X,T = LI()

ans = math.ceil(N/X) * T

print(ans)
n, m = [int(i) for i in input().split()]
x_arr = [int(i) for i in input().split()]
x_n = [[] for i in range(n)]

x_sort = sorted(x_arr)
x_sub = []

for i in range(m-1):
    x_sub.append(x_sort[i+1]-x_sort[i])

x_sub = sorted(x_sub)

for i in range(n-1):
    x_sub.remove(max(x_sub))

print(sum(x_sub))


### FIXED CODE ###

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

x_sort = sorted(x_arr)

if n >= m or m==1:
    print(0)
else:
    x_sub = [x_sort[i+1]-x_sort[i] for i in range(m-1)]
    x_sub = sorted(x_sub)
    print(sum(x_sub[:(m-1)-(n-1)]))
from operator import itemgetter
n, m = map(int, input().split())
abab = [list(map(int, input().split())) for _ in range(n)]
abab = sorted(sorted(abab, key=itemgetter(0), reverse=True), key=itemgetter(1), reverse=True)

gyara = [0 for _ in range(m+1)]

def index(a) :
    if a > m:
        return m+1 
    if gyara[a] :
        return index(a+1)
    else :
        return a

for a, b in abab :
    i = index(a)
    if i <= m :
        gyara[i] = b

print(sum(gyara))

### FIXED CODE ###

from heapq import *

n, m = map(int, input().split())
abab = [list(map(int, input().split())) for _ in range(n)]
bites = [[] for _ in range(m)]
for a, b in abab :
    if a <= m : bites[a-1].append(-b)
    
ans = 0
board = []
for bite in bites:
    for b in bite : heappush(board, b)
    if board : ans -= heappop(board)
print(ans)
import numpy as np
n = int(input())
al = list(map(int,input().split()))

for i in range(n):
    al[i] -= i + 1

med = np.median(np.array(al))

ans = 0
for a in al:
    ans += abs(a-med)
print(int(ans))

### FIXED CODE ###

import numpy as np
n = int(input())
al = list(map(int,input().split()))

for i in range(n):
    al[i] -= i + 1

med = np.median(np.array(al))

ans = 0
for a in al:
    ans += abs(a-med)
print(int(ans))
N = int(input()) 
for i in range(N) :
   a,b,c = map(int,input().split(" "))
   p = [a,b,c]
   p.sort()
   if pow(p[0],2)+pow(p[1],2)==pow[p[2],2]
   print("YES")
   else
   print("NO")


### FIXED CODE ###

n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [x,y,z]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')