peterverebics/CodeNet_Python_118 huggingface dataset:
import decimal
n = int(input())
a = list(map(int, input().split())) 

first = a[0]

ans = first*a[1]

print(ans)
for i in range(1, n-1):
    first += a[i]
    ans += first*a[i+1]

print(ans%(10**9+7))
N = int(input())
al = list(map(float,input().split()))
sss=0
for i in range(N):
    sss+=al[i]*sum(al[i+1:N])
print(int(sss)%1000000007)
N=int(input())
List = list(map(int, input().split()))
S=0
for i in range(len(List)):
    S+=List[i]
mod=10**9+7
S=S%mod
T=0
for i in range(len(List)):
    T+=List[i]*(S-List[i])
    T=T%mod
print(T/2)
n=int(input())
num=input().split()
sq=[]
for i in range(n):
  num[i]=int(num[i])
  sq.append(num[i]*num[i])
total=sum(num)
total=total*total
sqtotal=sum(sq)
print((total-sqtotal)/2)
import numpy as np

n = int(input())
a = input().split()
ai=np.array(a, dtype="int64")

total=sum(ai)**2
diagonal=sum(ai**2)
ans=(total-diagonal)/2

print(int(ans%(1E9+7)))
import numpy as np

n = int(input())
a_s = list(map(int, input().split()))
a_s_np = np.array(a_s)

inpro = np.inner(a_s, a_s)
sum_a = np.sum(a_s)

ans = (sum_a * sum_a - inpro) // 2

print(ans)
n= int(input())
mod=10**9+7
a= [int(x ) for x in input().split()]
b= a[:]

s=0
for i in range(n-2,-1,-1):
    b[i]=b[i+1]+b[i]

for i in range(n):
    s += (b[i]-a[i])*a[i]
n = int(input())
a = list(map(int, input().split()))

z = 0
for i in range(n):
    z += a[i]

y = z ** 2

x = 0
for j in range(n):
    x += a[j] ** 2

w = int(((y - x) / 2) % 1000000007)
print(w)
n = int(input())

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



count = 0

b_list = a_list



for i in range(n-1):

    for k in range(len(b_list[i+1:])):
        count += a_list[i] * b_list[i+1:][k]

print(count)
l_len = int(input())
l_num = list(map(int,input().split()))

sq_sum_num = sum(l_num)**2
sq_list = [i**2 for i in l_num]
sq_sum_taikaku = sum(sq_list)
totals = ((sq_sum_num - sq_sum_taikaku)/2)
total_v = totals % (10**9+7)
print(int(total_v))
import numpy as np

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

mod = 1000000007
res = np.cumsum(A, dtype=np.float64)
ans = 0

for i in range(N-1):
    S = (res[N-1]-res[i]) % mod
    ans += A[i]*S
    ans %= mod

print(int(ans))
mod = 1e9 +7
n = int(input())
a = list(map(int,input().split()))
a_sum = sum(a)
a_sum_sq = (a_sum*a_sum)%mod
i = 0
for y in range(n):
    i += (a[y]*a[y])
    i %= mod
print(int((((a_sum_sq-i)+mod)%mod)/2))
import numpy as np
import copy

N = int(input())
h = list(map(int, input().split()))
h.sort(reverse=True)
h2 = copy.copy(h)
ans = 0
s = np.sum(h2)
for i in range(N-1):
    s = s - h[i]
    ans = ans + h[i] * s
ans = ans % (10 ** 9 + 7)
print(int(ans))
n = int(input())
x = list(map(int, input().strip().split()))
sum=0
minsum=0
for i in range(0,n):
    minsum += x[i]
for i in range(0,n-1):
    minsum-=x[i]
    sum += x[i]*minsum
    print(sum)
    if(sum>10**9+7):
        sum%=(10**9+7)
print(sum)
n,*l=map(int,open(0).read().split())

print(int((sum(l)**2 - sum([a**2 for a in l])) / 2) % (10**9 + 7))
# -*- coding: utf-8 -*-
N= int(input())
A= list(map(int,input().split(' ')))
 
ans = 0
for i in range(len(A)-1):
  for j in range(i+1, len(A)):
    ans += A[i]*A[j]
 
print(ans)
N = int(input())
A = list(map(int,input().split()))
# (A合計**2)-ΣAそれぞれ**2
mod = 10**9+7
AA = sum(A)
ans = (AA%mod)**2
ans %= mod
for a in A:
    ans -= a**2
    ans %= mod
ans %= mod
print(ans//2)
n= int(input())
a=list(map(int,input().split()))
nanika=[]
s=sum(a)
k=0
ans=0
for i in range(n):
    k+=a[i]
    nanika.append(k)
for j in range(n):
    ans+=a[j]*(s-nanika[j])
print(int(ans%(1e+9 +7)))
n = int(input())
a = list(map(int, input().split(' ')))

MOD = 1000000007

sum_all = 0
for i in range(len(a)):
    sum_all += a[i]
sum_all %= MOD
sum = 0
for i in range(len(a)):
    sum += ((sum_all-a[i])*a[i])
    sum %= MOD

print(((sum//2) % MOD))
n = input()
vals = list(map(int, input().split()))
s = sum(vals)
ret = 0
for i, val in enumerate(vals):
    ret += val * (s - val)

mod = 10 ** 9 + 7
print(int(ret/2) % mod)
n = int(input())
a = list(map(int, input().split()))

sum = 0
for i in range(n):
    sum += a[i]

res = 0
for i in range(n):
    res = res + (sum - a[i]) * a[i]
print(int(res% (10**9 + 7)/2))
import itertools
N = int(input())
A = list(map(int, input().split()))
sm=0
mod=10**9+7
for i in itertools.combinations(A,2):
    sm+=(i[0]*i[1])%mod
    sm%mod

print(sm)
N = int(input())
A = [int(x) for x in input().split()]
assert(len(A) == N)
ps = A.copy()
sum_now = A[N-1]
for j in range(N-2,0,-1):
    sum_now = (sum_now + A[j])%(1e9+7)
    ps[j] = sum_now
res = 0
for i in range(N-1):
    res = (res + A[i] * ps[i+1]) % (1e9+7)
print(int(res))
N = int(input())
A = list(map(int, input().split()))
sumA = sum(A)
s = sum(a*a for a in A)
ans = sumA*sumA - s
print(ans//2)
#code
from itertools import combinations
n=1
while n>0:
    n-=1
    s=0
    k=int(input())
    l=list(map(int,input().split()))
    p=list(combinations(l,2))
    for i in p:
        t=list(i)
        s=s+(t[0]*t[1])
    print(s)
n=int(input())
x = [int(i) for i in input().split()]
s1=0
s2=0
for i in range (0,n):
  s1=s1+x[i]
  s2=s2+x[i]**2
s1=s1**2
ans=(s1-s2)/2
print(int(ans%1000000007))
N = int(input())
A_list = [int(_) for _ in input().split()]
sum_of_A_sq = sum(A_list)
sum_of_sq_A = sum([_**2 for _ in A_list])

ans = (sum_of_A_sq**2-sum_of_sq_A)/2
ans = ans%(10**9+7)

print(int(ans))
from numba import jit
import numpy as np

@jit
def main():
    N = int(input())
    A = np.array(list(map(int, input().split())), dtype=np.int64)
    mod = 10**9 + 7

    answer = 0
    for i in range(N):
        answer = answer % mod +  A[i] % mod * (A[i+1:]).sum() % mod

    print(answer)

main()
n = int(input())
alist = list(map(int,input().split()))
wa = sum(alist) % (10**9 + 7)
answer = 0
for i in range(n):
    atai = 0
    if wa - alist[i] < 0:
        atai = wa - alist[i] + 10**9 + 7
    else:
        atai = wa - alist[i]
    answer += atai * alist[i]
    answer = answer % (10**9 + 7)
print(int(answer/2))
import numpy as np
n = int(input())
num_list = list(map(int, input().split()))

mod = 1e+9+7
cumsum_list = np.cumsum(num_list[::-1])[::-1][1:]
score = 0
for i in range(n-1):
    score += num_list[i] * cumsum_list[i] % mod
    
print(int(score % mod))
n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7
f = sum(a)%mod
ans = 0
for i in range(n):
  e = (f-a[i])%mod
  ans+= (e*a[i])%mod
  ans%=mod
print(int(round(ans/2)))
import numpy as np

mod = 10**9+7
N = int(input())
A = np.array([int(i) for i in input().split()])

sum = A.sum() % mod

B = np.square(A)
sum2 = B.sum() % mod

ans = (sum**2 - sum2) % mod

if ans%2==1 : ans += mod
ans //= 2
ans %= mod
print(int(ans))
N = int(input())
A = [int(x) for x in input().split()]

mod = 10**9 + 7
x = int(sum(A) / 2)**2 * 2 % mod
y = (x - sum([a**2 / 2 % mod for a in A]))
print(int(y) % mod)
# C - Sum of product of pairs
import numpy as np

N = int(input())
A = list(int(a) for a in input().split())
A = np.array(A)
MOD = 10**9 + 7
csA = np.cumsum(A)

ans = 0
for i in range(N-1):
    ans += (A[i] * (csA[-1] - csA[i])) % MOD
    ans = ans % MOD
print(ans%MOD)
n=int(input())
b=input().split()
i=0
j=1
s=0
while i<(n-1):
    if j==n:
        i+=1
        j=i+1
    else:
        s=(s+(int(b[i])*int(b[j])))
        j+=1
print(s)
N = int(input())
A = list(map(int, input().split()))

ans = 0
x = 0

for a in A:
    ans = (ans + a * x) % (1e9+7)
    x = (x + a) % (1e9+7)

print(ans)
N = int(input())
A = list(map(int, input().split()))
mod = 10**9+7
total = sum(A)
ans = 0
for a in A:
    ans += (total-a)*a
    ans = ans % mod

ans = ans // 2
print(ans)
import numpy as np
import itertools
N = input()
A = list(map(int,input().split()))
mod = 10**9+7
s = 0
for pair in itertools.combinations(A, 2):
  s = s + (pair[0]*pair[1] % mod)
print(s)
n = int(input())
a = list(map(int,input().split()))
b = sum(a)**2
c = 0
for i in range(n):
    c += a[i]**2
print((b-c)/2%(10**9+7))
n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans-=a[i]*a[i]
ans/=2
mod=10**9+7
ans//=mod
print(ans)
N = int(input())
A = [int(e) for e in input().split()]

S = [0]
sum =0
for i in range(0, N):
    S.append(S[i] + A[i])
    print(S[i+1])

for i in range(N):
    sum = sum + (S[i+1]-A[i]) * A[i]

print(sum)
import collections
from functools import lru_cache
import bisect

INF = float("inf")
ZERO = 0
ONE = 1


def read():
    return input().strip()


def readInt():
    return int(input().strip())


def readList():
    return list(map(int, input().strip().split()))


def solve(N, arr):
    ans = 0
    MOD = 10**9 + 7
    s = sum(arr) % MOD

    for num in arr:
        ans = (ans + (s-num)*num) % MOD

    return (ans % MOD) // 2


N = readInt()
arr = readList()

print(solve(N, arr))
from sys import stdin

n = stdin.readline().rstrip().split()[0]
A = [int(x) for x in stdin.readline().rstrip().split()]

print(int(((sum(A)**2 - sum([a**2 for a in A])) / 2) % (10**9 + 7)))
a = int(input())
p = list(map(int,input().split()))
t = 1
sum_list = []
for i in range(a):
    for t in range(a):
        if i >= t:
            continue
        w = p[i]*p[t]
        sum_list.append(w)

print(sum(sum_list))
N=int(input())
S=list(input().split())
A=[int(n) for n in S]
ans=int(0)
for i in A:
    for j in A:
        ans += i*j
print(ans)
n = int(input())
a = list(map(int, input().split(' ')))

MOD = 1000000007

sum_all = 0
for i in range(len(a)):
    sum_all += a[i]
#sum_all %= MOD
sum = 0
#print(sum_all)
for i in range(len(a)):
    X = (sum_all - a[i])
    Y = a[i]
    sum += (X*Y/2)%MOD
print(int(sum)%MOD)
n=int(input())
i = list(map(int, input().split())) 

m=sum(i)

ans=0
for k in range(n-1):
    ans+=(i[k]+(m-i[k]))
ans=ans//2
ans=ans%(10**9+7)
print(ans)
N=int(input())
A=list(map(int,input().split()))
C=[A[i]**2 for i in range(N)]
print(int(((sum(A)**2-sum(C))/2)%(10**9+7)))
N = int(input())
A = list(map(int, input().split()))
ans=0
for i in range(N):
    ans+=(sum(A)-A[i])*A[i]
print((ans/2)%(10**9+7))
n = int(input())
a = [int(i) for i in input().split()]

sum1 = 0
sum2 = 0

for _ in a:
  sum1 += _
  sum2 += (_*_)
sum1 = (sum1 * sum1)
print((sum1 - sum2)//2)
N = 3
alist = [1, 2, 3]
Sum_a = 0
for i in range(N):
  Sum_j = 0
  for j in range(i+1, N):
    Sum_j += alist[j]%(1e9+7)
  Sum_a += (alist[i]%(1e9+7))*Sum_j
print(int(Sum_a))
n = int(input())
m = 1e9 + 7
a = list(map(int, input().split()))
s = sum(a)
s *= s
r = sum([x*x for x in a])
ans = (s - r) / 2
ans %= m
print(ans)
n=int(input())
a=list(map(int,input().split()))
ans=0
p=10**9+7
for i in range(n):
    ans=(ans+a[i]**2)%p
am=sum(a)%p
print(((am**2-ans)%p)//2)
N = int(input())
A = list(map(int, input().split()))

sum_of_power = sum(A) ** 2
power_of_sum = sum([a ** 2 for a in A])

ans = ((sum_of_power - power_of_sum) / 2) % (1e9 + 7)

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

sums = 0
for i in range(n):
    sums += a[i]

sums = sums*sums;
suma = 0
for i in range(n):
    suma += a[i]*a[i]

ans = (sums - suma) / 2
ans %= 1000000007

if (ans < 0):
    ans += 1000000007
    ans /= 2
    
print(int(ans))
mod = pow(10,9)+7
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    a[i] %= mod
ans += sum(a)*sum(a)
for i in range(n):
    ans -= a[i]*a[i]
ans = int(ans/2)
print((ans)%mod)
import numpy as np

N = int(input())
A = list(map(int, input().split()))
mod = 10**9 + 7
A_cum = np.array(A).cumsum()

ans = 0
for i in range(N):
    ans += ((A_cum[-1] - A_cum[i]) * A[i])

print(ans % mod)
N = int(input())
A = list(map(int, input().split()))

# ans = 0

# for i in range(0, N-1):
#     for j in range(i+1, N):
#         ans += A[i]*A[j]

# div, mod = divmod(ans, 1000000007)

# print(mod)

diag=0
for a in A:
    diag+=a**2

print(int(((sum(A)**2-diag)/2) % (1e9+7)))
n=int(input())
a=list(map(int,input().split()))
if sum(a)==0:
    print(0)
    exit()
else:
    k=1
    for i in range(n-1):
        for j in range(i+1,n):
            k*=a[i]*a[j]
            k/=10**9+7
print(k)
n = int(input())
A = list(map(int,input().split()))

wa = sum(A)
ans = 0
for i in range(n):
    ans += (wa - A[i]) * A[i]

print((ans % ((10 ** 9)+7))//2)
n = int(input())
a = list(map(int, input().split()))
b = 10**9+7
sa = sum(a)
c=0
for i in a:
    c +=i*i

print(int(((sa**2-c)/2)%b))
n = int(input())
aaa = list(map(int, input().split()))

sum_a = 0
sum_aa = 0
for a in aaa:
  sum_a += a
  sum_aa += a ** 2
  
print(int(((sum_a ** 2 - sum_aa) / 2) % (10 ** 9 + 7)))
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a[:n]:
    for j in a[a.index(i)+1:]:
        ans += i*j
print(ans%(10**9+7))
N = int(input())
A = list(map(int, input().split()))



A_sum = 0
for i in range(0, N, 1):
    A_sum = A_sum + A[i]

A_sum_sq = A_sum * A_sum

idv_sq_sum = 0
for i in range(0, N, 1):
    idv_sq_sum += A[i] * A[i]

Answer = (A_sum_sq -
          idv_sq_sum) / 2
print(Answer%(10**9 + 7))
N = int(input())
A = list(map(int,input().split()))


Sum = 0
mod_n = 10.0E8 +7

for i in range(N-1):
    for j in range(i+1,N):
        if j == len(A):
            break
        else:
            Sum +=  A[i]*A[j]
        


# for i in A:
#     Sum -= i**2

# Sum = int(Sum/2)
print(Sum)


print(int(Sum % mod_n))
import numpy as np

N = int(input())
A = np.array([int(i) for i in input().split()])
sum = A.sum()
sum2 = int((A**2).sum())
ans = int(((A.sum())**2 - sum2)/2) % (10**9+7)
print(ans)
n = int(input())
a = list(map(int, input().split()))
sum = 0
ans = 0
for i in range(n):
    sum+=a[i]
for i in range(n):
    sum-=a[i]
    ans+=(a[i]*sum)
    ans%=1e9+7
print(int(ans))
n = int(input())
a = list(map(int,input().split()))
sum = 0
m = 10**9+7

for i in range(n):
  sum = (sum+a[i])%m

#sum = sum%m
#sum = sum*sum
ans = 0
for i in range(n):
  ans = (ans + sum*a[i])%m
  ans = (ans - a[i]*a[i])%m
ans = int(ans/2)
ans = ans%m

print(ans)
import sys
sys.setrecursionlimit(10**6)

n = int(input())
A = list(map(int, input().split()))
#n, m = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

MOD = 10**9+7

tot = sum(A)

ans = 0

for a in A:
    ans += a*(tot-a)
    ans %= MOD

ans //= 2
ans %= MOD

print(ans)
n=int(input())
a=list(map(int,input().split()))
ans=sum(a)*sum(a)
for i in range(n):
  ans=ans-(a[i]*a[i])
ans=ans/2
mod=10**9+7
ans=ans%mod
print(ans)
import sys
import array
import numpy as np

N = int(input())
A = list(map(int, input().split()))
array_sum = 0
B = np.array(A)

result = (B.sum()**2 - B.dot(B)) / 2
print(int(result%(10**9+7)))
#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))
  
n=int(input())
A=input_array()
acc_A=[0]

for i in range(n):
	acc_A.append(acc_A[i]+A[i])
ans=0
print(A,acc_A)
for i in range(n):
	# print(A[i]*acc_A[i:n+1])
	ans+=A[i]*(acc_A[n]-acc_A[i+1])

print(ans %(10**9+7))
n = int(input())
a = list(map(int, input().split()))
A = [0]*(n)
num = 1e9+7
ans = 0
for i in range(1, n):
    A[i] = A[i-1] + a[i-1]
for i in range(n-1, 0, -1):
    ans += (A[i]*a[i])%num
    ans %= num
ans %= num
print(int(ans))
def solve():
  N = int(input())
  AA = list(map(int,input().split()))
 
  ans = 0
  for a in AA:
    ans += a
  ans = ans % (10**9+7)
  ans = ans**2
  for a in AA:
    ans -= a**2
    if ans<0:
      ans += 10**9+7
  ans = ans % (10**9+7)
  while ans<0:
    ans += 10**9+7
  print(int(ans/2))
solve()
from math import ceil
N,X,T=map(int,input().split())
print(T*ceil(N/X))
N,X,T = map(int,input().split())

if N%X != 0:
	print(((N//X)+1)*T)
else:
	print(((N//X))*T)
N, X, T = map(int, input().split())

ans = (N // X) * T

if N % X == 0:
    print(ans)
    exit()

else:
    ans += T
    print(ans)
import math
n, x, t = map(int, input().split())
print(t * math.ceil(n/x))
import math
n,x,t = map(int,input().split())
zz = math.ceil(n/x)
print(zz*t)
N,X,T = list(map(int, input().split()))

a = N//X
b = N%X
if b > 0:
    a+=1

print(a*T)
# -*- coding: utf-8 -*-
"""
X : 一度に焼ける最大個数
T : 焼く時間
N : 必要個数
N個のたこ焼きを作るのに何分必要か？
"""

N, X, T = [int(i) for i in input().split()]
#print(N,X,T)
print(-(-N // X) * T)
N, X, T = map(int, input().split())

a = int(N / X)
if N % X == 0:
    a = a
else:
    a = a + 1
print(a * T)
N, X, T = map(int, input().split())

if(N % X == 0):
    ans = T * int(N/X)
else:
    ans = T * (int(N/X) + 1)

print(ans)
N, X, T = map(int, input().split())

ans = 0
while N > 0:
    ans += T
    N -= X

print(ans)
import math
N,X,T = map(int, input().split())
print(math.ceil(N/X) * T)
n,x,t = map(int,input().split())
if n % x == 0:
  print(n // x * t)
else:
  print(n // x * t + t)
n, x, t = map(int,input().split())

act = n // x

if n % x != 0:
    act += 1

print(int(act * t))
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    n, x, t = inl()

    return t * ((n + x - 1) // x)


print(solve())
import sys
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))

MOD = 10**9 + 7


def main():
	# ans_ = []
	# ans_.append(ans)
	# print(("\n").join(map(str, ans_)))
	n, x, t = read()
	print(ceil(n/x)*t)






if __name__ == "__main__":
	main()
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

n,x,t=map(int,input().split())
print(t*(-(-n//x)))
n, x, t = map(int, input().split())

if n % x == 0:
    ans = n // x * t
else:
    ans = (n // x + 1) * t 

print(ans)
n,x,t = map(int,input().split())
a = n / x +0.99999999999
print(int(a)*t)
from math import ceil

n,x,t=map(int, input().split())
val=ceil(n/x)
#print(val)
print(t*val)
n,x,t=map(int, input().split())
a=(n/x)
if a==type(int):
    a=str(a)
    b=int(a[:a.index(".")])
else:
    a=str(a)
    a2=a[a.index("."):]
    if a2=='.0':
        b=int(a[:a.index(".")])
        print(b*t)
    else:
        b=int(a[:a.index(".")])+1
        print(b*t)
import math
n,x,t=map(int,input().split())
ans=math.ceil(n/x)
print(ans*t)
N, X, T = map(int, input().split())
if N%X ==0:
    print((N//X)*T)
else:
    print((N//X + 1)*T)
N, X, T = map(int, input().split())
print((N // X + 1) * T if N % X else (N // X) * T)
import sys
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()



def main():
	n,x,t=MI()
	y=(n-1)//x+1
	print(y*t)







if __name__ == "__main__":
	main()
N,X,T = map(int, input().split()) 

if N%X==0:
    ans = (N/X) * T
else:
    ans = (N//X + 1) * T

print(int(ans))
N,X,T = map(int,input().split())

tmp = N//X
tmp2 = N%X
if tmp2 == 0:
    ans = tmp * T
else:
    ans = (tmp+1)*T

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

if n % x == 0:
    print((n//x) * t)
else:
    print((n//x+1)*t)
x, n, t = list(map(int, input().split()))
result = (-(-x // n)) * t
print(result)
n, x, t = map(int, input().split())
a = n // x
if n % x == 0:
  print(a * t)
else:
  print((a + 1) * t)
i = list(map(int, input().split()))

ws = i[0]
cs1 = i[1]
cs2 = i[1]
t = i[2]
n = 1
while ws > cs1:
    n += 1
    cs1 += cs2
tt = n * t
print(tt)
n, x, t = map(int, input().split())
r = n % x
res = (n // x + 1) * t if n % x != 0 else n // x * t
print(res)
n,x,t=map(int, input().split())
tako = n//x
amari = n%x
ans = tako*t
if amari != 0:
    ans += t
print(ans)
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N,X,T = MI()
print(T*((N+X-1)//X))
n, x, t = map(int, input().split())

if n%x == 0:
    print(n//x*t)
else:
    print((n//x+1)*t)
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,X,T=MI()
    
    cnt=(N+X-1)//X
    ans=cnt*T
    print(ans)

main()
n, x, t = map(int, input().split())
print(((n - 1) // x + 1) * t)
import math
N,X,T=map(int,input().split())
print(math.ceil(N/X)*T)
import math

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

print(math.ceil(n/x)*t)
n, x, t =map(int, input().split())
k = (n + x - 1) // x
ans = k * t
print(ans)
n, x, t = list(map(int, input().rstrip().split(" ")))
print(((n-1)//x + 1)*t)
N, X, T = map(int, input().split())

print((N + (X-1)) // X * T)
# -*- coding: utf-8 -*-
# A

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

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

print(math.ceil(n / x)*t)
n, x, t = map(int, input().split())
a = n // x
if n % x != 0:
    a += 1
print(a * t)
#176-A Takoyaki

takoyaki = input().split()

totalTime = -(-int(takoyaki[0]) // int(takoyaki[1])) * int(takoyaki[2])
print(totalTime)
N,X,T = map(int,input().split())
print((N+X-1)//X*T)
N,X,T = map(int,input().split())
count = 1
while N > X:
  N = N - X
  count += 1
print(T*count)
#A - Takoyaki
N,X,T = map(int,input().split())
Time = (int(N / X ) ) * T
amari = N % X
if amari != 0 :
    Time += T
# 出力
print(Time)
n, x, t = map(int, input().split())
print((n + x - 1) // x * t)
n, x, t = map(int, input().split())

temp = int(n / x)
if n % x != 0:
    temp += 1

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

if n % x == 0:
    result = int(n / x * t)
    
else:
    result = int((n // x + 1) * t)

print(result)
n,x,t=map(int,input().split())
if n%x==0:
    print(int(n/x*t))
else:
    print(int(n//x+1)*t)
import math
n,x,t = map(int, input().split())
ans = math.ceil(n/x) * t
print(ans)
import math;

n,x,t=list(map(int,input().split()))
print(math.ceil(n/x)*t)
def resolve():
    N, X, T = map(int,input().split())
    turn = N//X
    if N%X == 0:
        print(turn*T)
    else:
        print((turn+1)*T)
resolve()
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,x,t=mp()
print(((n-1)//x+1)*t)
import math
N, X, T = map(int, input().split())
print(math.ceil(N/X)*T)
n, x, t = map(int, input().split())
num = n // x
if n % x != 0:
    num += 1
print(t * num)
N,X,T =map(int,input().split())
ans =T*(N//X)
if N%X!=0:
  ans += T
print(ans)
n,x,t = map(int,input().split())
if n%x == 0:
  print(int(t*n/x))
else:
  print(int(t*(n//x + 1)))
n,x,t = map(int,input().split())
ans = -(-n//x)*t
print(ans)
n,x,t=map(int,input().split())

tt=((n-1)//x+1)*t
print(tt)
import math
n,x,t=map(int,input().split())
print(math.ceil(n/x)*t)
from math import ceil
def mlt(): return map(int, input().split())


x, y, z = mlt()

print(ceil(x/y)*z)
import math
n,x,t = map(int, input().split())
print(math.ceil(n/x)*t)
def main():
    N, X, T = (int(i) for i in input().split())
    print((0--N//X)*T)


if __name__ == '__main__':
    main()
n,x,t = map(int,input().split())
x = n/x
if x%1 == 0:
    print(int(x)*t)
else:
    print((int(x)+1)*t)
from math import ceil

# print('input >>')
N, X, T = map(int,(input().split()))

# print('-----output-----')
print(ceil(N / X) * T)