Problem:
 Score : 100 points    Problem Statement We have a grid with H rows and W columns, where all the squares are initially white.  You will perform some number of painting operations on the grid.
In one operation, you can do one of the following two actions:   Choose one row, then paint all the squares in that row black.  Choose one column, then paint all the squares in that column black.   At least how many operations do you need in order to have N or more black squares in the grid?
It is guaranteed that, under the conditions in Constraints, having N or more black squares is always possible by performing some number of operations.      Constraints  1 \leq H \leq 100  1 \leq W \leq 100  1 \leq N \leq H \times W  All values in input are integers.         Input Input is given from Standard Input in the following format:  H  W  N       Output Print the minimum number of operations needed.        Sample Input 1 3
7
10      Sample Output 1 2  You can have 14 black squares in the grid by performing the "row" operation twice, on different rows.       Sample Input 2 14
12
112      Sample Output 2 8       Sample Input 3 2
100
200      Sample Output 3 2

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    h, w, n = int(input()), int(input()), int(input())
    print(min((n - 1) // h + 1, (n - 1) // w + 1))
resolve()

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
ans = n // max(h,w) if n % max(h,w) == 0 else n // max(h,w) + 1
print(ans)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
a = max(h, w)
if n%a == 0:
    print(n//a)
else:
    print(n//a + 1)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7

    h=I()
    w=I()
    n=I()
    ver=0
    hor=0
    ans=0
    while n>0:
        if h-hor>=w-ver:
            n-=(h-hor)
            ver+=1
            ans+=1
        else:
            n-=w-ver
            hor+=1
            ans+=1
    print(ans)



        
        
        
        
        
    
if __name__=="__main__":
    main()

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print((n-1)//max(h,w)+1)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print((n-1)//max(h,w)+1)

Solution (Python):
from math import ceil

h = int(input())
w = int(input())
n = int(input())

if h >= w:
    print(ceil(n/h))
else:
    print(ceil(n/w))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
cnt = 0
blk = 0

if h > w:
  for i in range(w):
    blk += h
    cnt += 1
    if blk >= n:
      break
else:
  for j in range(h):
    blk += w
    cnt += 1
    if blk >= n:
      break

print(cnt)

Solution (Python):
import math

h=int(input())
w=int(input())
n=int(input())
print(math.ceil(n/max(h,w)))

Solution (Python):

import math

h=int(input())
w=int(input())
n=int(input())
print(math.ceil(n/max(h,w)))

Solution (Python):
from math import ceil
h = int(input())
w = int(input())
n = int(input())
if h >= w:
    print(ceil(n/h))
else:
    print(ceil(n/w))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())

ans=(n+max(h,w)-1)//max(h,w)
print(ans)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
print(-(-n//max(h,w)))

Solution (Python):
H=int(input())
W=int(input())
N=int(input())

if N%max(H,W)==0:
  print(N//max(H,W))
else:
  print(N//max(H,W)+1)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

tmp1 = min(H, W)
tmp2 = max(H, W)

for i in range(tmp1):
  N = N - tmp2
  if N <= 0:
    print(i + 1)
    break

Solution (Python):
from math import ceil
h=int(input())
w=int(input())
n=int(input())
res=ceil(n/max(h,w))
print(res)

Solution (Python):
import math
h = int(input())
w = int(input())
n = int(input())
ans = math.ceil(n/max(h,w))
print(ans)

Solution (Python):

import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    H = int(input())
    W = int(input())
    N = int(input())

    ans = N // max(H, W)
    if N % max(H, W) != 0:
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):

h=int(input())
w=int(input())
n=int(input())
num=max(h,w)
if n%num==0:
    print(n//num)
else:
    print((n//num) +1)

Solution (Python):
H=int(input())
W=int(input())
N=int(input())

x = max(H,W)
print((N+x-1)//x)

Solution (Python):
H=int(input())
W=int(input())
N=int(input())
c=0
ch=0
cw=0

while c<N:
    if H-cw>W-ch:
        c+=H-cw
        ch+=1
    else:
        c+=W-ch
        cw+=1

print(ch+cw)

Solution (Python):
A = int (input ())
B = int (input ())
N = int (input ())
if A < B:
  X = N//B
  if N%B == 0:
    print (X)
  else:
    print (X+1)
else:
  X = N//A
  if N%A == 0:
    print (X)
  else:
    print (X+1)

Solution (Python):
def main():
    h = int(input())
    w = int(input())
    n = int(input())

    a = max(h, w)

    print((n + a - 1) // a)


if __name__ == "__main__":
    main()

Solution (Python):
h, w, n= [int(input()) for i in range(3)]
k = max(h, w)
ans = (n+k-1)//k
print(ans)

Solution (Python):




h = int(input())
w = int(input())
N = int(input())

m = max(h,w)
d = N//m
if N%m == 0:
  print(d)
else:
  print(d+1)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print(-(-n//max(h,w)))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

ans = 0
i = 0
m = max(h,w)
while True:
    ans +=1
    i += m
    if i >= n:
        print(ans)
        break

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

def f(a):
   if N % a == 0:
      result = int(N / a)
   else:
      result = int(N / a) + 1
   print(result)

if H <= W:
   f(W)
else:
   f(H)

Solution (Python):
a = int(input())
b = int(input())
n = int(input())
t = max(a, b)
print((n + t - 1) // t)

Solution (Python):
import sys
def main():
    h, w, n = map(int, sys.stdin.read().split())
    print(-(-n // max(h, w)))

if __name__ == '__main__':
    main()

Solution (Python):
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  H=int(pin())
  W=int(pin())
  N=int(pin())
  t=max(H,W)
  if N%t==0:
    print(N//t)
  else:
    print(N//t+1)
  return 

main()

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a = max(ri(), ri())
print(math.ceil(ri()/a))

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

a = max(H,W)

if N%a == 0:
    print(N//a)
else:
    print(N//a+1)

Solution (Python):
h = int(input())
w = int(input())
m = int(input())
total = 0
if h < w:
  h,w = w,h
for i in range(w):
  total += h
  if total >= m:
    print(i+1)
    exit()

Solution (Python):
a = [int(input()) for _ in range(3)]
print((a[2] + max(a[0], a[1]) - 1) // max(a[0], a[1]))

Solution (Python):




h = int(input())
w = int(input())
n = int(input())


ans = n // max(h, w)
if n % max(h, w) > 0:
    ans = ans + 1


print(ans)

Solution (Python):
x=int(input())
y=int(input())
z=max(x,y)
print(-int(input())//z*-1)

Solution (Python):
import math
H = int(input())
W = int(input())
N = int(input())
print(math.ceil(N/max(H,W)))

Solution (Python):
import sys
H = int(input())
W = int(input())
N = int(input())
X = max(H, W)
Y = min(H, W)
count = 0
total = 0
for _ in range(Y):
    total += X
    count += 1
    if total >= N:
        print(count)
        sys.exit()
for _ in range(X):
    total += Y
    count += 1
    if ctotal >= N:
        print(count)
        break

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

ans = n = 0
while n < N:
    if H<W:
        n += W
        H -= 1
    else:
        n += H
        W -= 1
    ans += 1
print(ans)

Solution (Python):
H, W, N = map(int, open(0).read().split())
if H > W:
    H, W = W, H
print((N + W - 1) // W)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
a = max(H,W)
n = N//a
if N%a==0:
    print(n)
else:
    print(n+1)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
m = max(H, W)
print((N + m - 1) // m)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
v = max(h,w)
cnt = (n-1)//v + 1
print(cnt)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

print(n//max(h,w) if n%max(h,w)==0 else n//max(h,w)+1)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
v = max(H, W)
ans = N // v
if N%v != 0:
    ans += 1

print(ans)

Solution (Python):
h = int(input());    w = int(input());    n = int(input())
a = max(h,w)
print(n//a + 1 if n%a else n//a)

Solution (Python):
a = input()
b = input()
c = input()
d = int()
e = int()

if int(a) > int(b):
  d = int(a)
else:
  d = int(b)

e = int(c) // d
  
if int(c) % d != 0:
  e = e+1

print(e)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
m = max(h, w)
ans = n // m
if n % m != 0:
    ans += 1
print(ans)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

print(min(-(-N//H), -(-N//W)))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

i=1
while n > max(h,w)*i:
    i += 1
else: print(i)

Solution (Python):
H,W,N = map(int, open(0).read().split())

ans = 0
while N > 0:
    A = max(H, W)
    tmp = N // A
    N = N % A
    if tmp == 0 and N:
        N = 0
        ans += 1
        break
    if H == A:
        W -= tmp
    else:
        H -= tmp
    ans += tmp

print(ans)

Solution (Python):
H=int(input())
W=int(input())
N=int(input())
K=H
if K<W: K=W
sum = 0
ans= 0
for i in range(1,K+1):
  if sum < N:
    sum += K
    ans = i
    
print(ans)

Solution (Python):
import math
H = int(input())
W = int(input())
N = int(input())
n = max(H,W)
print(math.ceil(N/n))

Solution (Python):
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()))

h=int(input())
w=int(input())
n=int(input())
a=max(h,w)
print((n-1)//a+1)

Solution (Python):
H, W, N = map(int,open(0))
print((N+max(H,W)-1)//max(H,W))

Solution (Python):
h= int(input())
w = int(input())    
n = int(input())
a = max(h,w)
print((n+a-1)//a)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
M = max(H, W)
print((N+M-1)//M)

Solution (Python):
from math import ceil

H=int(input())
W=int(input())
N=int(input())
print(ceil(N/max(H,W)))

Solution (Python):
h, w, n = map(int, [input() for _ in range(3)])
print((n-1)//max(h, w)+1)

Solution (Python):
import sys
import math

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    H = int(readline())
    W = int(readline())
    N = int(readline())
    print(math.ceil(N/max(H,W)))


if __name__ == '__main__':
    main()

Solution (Python):
def solve():
  H = int(input())
  W = int(input())
  N = int(input())
  ans = -(-N//max(H,W))
  return ans
print(solve())

Solution (Python):
H=int(input())
W=int(input())
N=int(input())
print(min(-(-N//H),-(-N//W)))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
x = max(h, w)
print((n + x - 1) // x)

Solution (Python):
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    H, W, N = [ii(), ii(), ii()]
    print(math.ceil(N/max(H, W)))


if __name__ == '__main__':
    main()

Solution (Python):
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    [h, w, n] = [int(readline().rstrip()) for _ in range(3)]
    print(math.ceil(n/max(h, w)))


if __name__ == '__main__':
    main()

Solution (Python):
import math

h = int(input())
w = int(input())
n = int(input())

if h > w:
    print(math.ceil(n / h))
else:
    print(math.ceil(n / w))

Solution (Python):
h,w,n=[int(input()) for _ in range(3)]
m=max(h,w)
print(0--n//m)

Solution (Python):
import math
h = int(input())
w = int(input())
n = int(input())
ans = math.ceil(n / max(h, w))
print(ans)

Solution (Python):
import math
h= int(input())
w= int(input())
n = int(input())

ans = math.ceil(n/max(h,w))

print(ans)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
for i in range(min(h,w)):
    n = n - max(h,w)
    if n <= 0:
        print(i + 1)
        break

Solution (Python):
a,b,n=map(int,open(0).read().split());print(-(-n//max(a,b)))

Solution (Python):
H,W,N=map(int,open(0))
print(0--N//max(H,W))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
if h >= w and n%h != 0:
    print(n//h+1)
elif h >= w and n%h == 0:
    print(n//h)
elif w >= h and n%w != 0:
    print(n//w+1)
else:
    print(n//w)

Solution (Python):
a = [int(input()) for _ in range(3)]
num = a[2]/max(a[0], a[1])
if num.is_integer():
    print(int(num))
else:
    print(int(num)+1)

Solution (Python):
from math import ceil

H,W,N = map(int, open(0).read().split())
m = max(H,W)
print(ceil(N/m))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print(int((n-1)/max(h, w))+1)

Solution (Python):
import math
h=int(input())
w=int(input())
n=int(input())
print(math.ceil(n/max(h,w)))

Solution (Python):
h, w, n = [int(input()) for _ in range(3)]
print((n - 1) // max(h, w) + 1)

Solution (Python):
H,W,N=[int(input()) for i in range(3)]
print(min((N+H-1)//H,(N+W-1)//W))

Solution (Python):
import math
H,W,N=[int(input()) for i in range(3)]
print(math.ceil(N/max(H,W)))

Solution (Python):
def solve(H, W, N):
    c = 0
    b = 0
    L = max(H, W)
    while b < N:
        b += L
        c += 1
    return c
H = int(input())
W = int(input())
N = int(input())
print(solve(H, W, N))

Solution (Python):
ans = 100
H = int(input())
W = int(input())
N = int(input())

for i in range(H+1):
    for j in range(W+1):
        if i * W + j * H - i * j >= N:
            ans = min(ans, i+j)

print(ans)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
print(-(-n//max(h,w)))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
if h >= w:
    _max = h
    _min = w
else:
    _max = w
    _min = h
for i in range(1, _min+1):
    if _max * i >= n:
        print(i)
        break

Solution (Python):
from math import ceil
H = int(input())
W = int(input())
N = int(input())
print(ceil(N/max(H, W)))

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

m = max(H, W)
ans = int((N - 1) / m) + 1
print(ans)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

x = max(h, w)
ans = (n + x - 1) // x
print(ans)

Solution (Python):
h = int(input())
w = int(input())
x = int(input())
m = max(h, w)
print((x+m-1)//m)

Solution (Python):
h = int(raw_input())
w = int(raw_input())
n = int(raw_input())
h,w = max(h,w),min(h,w)
print (n + h-1)/h

Solution (Python):








a = int(input())
b = int(input())
c = int(input())
print((c+max(a, b)-1)//max(a, b))

Solution (Python):
import math
h,w,n=map(int,open(0).read().split());print(math.ceil(n/max(w,h)))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
print(min((n+h-1)//h,(n+w-1)//w))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

q,r = divmod(n, max(h,w))
print(q + int(bool(r)))

Solution (Python):
import math

H = int(input())
W = int(input())
N = int(input())

for i in range(1, max(H, W)+1):
    if(max(H, W)*i >= N):
        print(i)
        break

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
ans=0
while n>=1:
  if h>w:
    n-=h
    w-=1
    ans+=1
  else:
    n-=w
    h-=1
    ans+=1
print(ans)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
print(-(-N//max(H,W)))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
import math
print(math.ceil(n/max(h,w)))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())

cnt=0
ans=0
while cnt<n:

    if h>=w:
        cnt+=h

    elif h<w:
        cnt+=w
    ans+=1

print(ans)

Solution (Python):
import math
h=int(input())
w=int(input())
n=int(input())
if h>=w: print(math.ceil(n/h))
else: print(math.ceil(n/w))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
cnt = 0
ans = 0
while ans < n:
    if h < w:
        ans += w
        h -= 1
    else:
        ans += h
        w -= 1
    cnt += 1
print(cnt)

Solution (Python):
def resolve():
    import math
    H = int(input())
    W = int(input())
    N = int(input())
    print(math.ceil(N/max(H, W)))
resolve()

Solution (Python):
import sys



from bisect import bisect_left, bisect_right





input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10 ** 9 + 7
def solve():
    h = int(input())
    w = int(input())

    k = int(input())

    a = ((k - 1) // (max(h, w)))
    print(a + 1)


def main():
    n = getN()
    for _ in range(n):
        solve()
if __name__ == "__main__":
    
    solve()

Solution (Python):
import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    print(math.ceil(n/w))
else:
    print(math.ceil(n/h))

Solution (Python):
import math
h=int(input())
w=int(input())
n=int(input())
print(math.ceil(n/max(h,w)))

Solution (Python):
import sys
readline = sys.stdin.readline

def main():
    H = int(readline())
    W = int(readline())
    N = int(readline())
    print(-(-N // max(H, W)))

if __name__ == '__main__':
    main()

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print(min(-(-n//h),-(-n//w)))

Solution (Python):
a = [int(input()) for i in range(2)]
b = int(input())

if b % max(a) == 0:
    print(b // max(a))
else:
    print(b // max(a) + 1)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

cnt = 0
res = 0
while True:
    if cnt >= N:
        break
    cnt += max(H, W)
    res += 1

print(res)

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    h = gete(int)
    w = gete(int)
    n = gete(int)

    if h < w:
        h, w = w, h

    print((h + n - 1) // h)


if __name__ == "__main__":
    main()

Solution (Python):
a = [int(input()) for i in range(2)]
b = int(input())
if b % max(a) == 0:
  print(b // max(a))
else:
  print(b // max(a) + 1)

Solution (Python):
import math
def main():
    H = int(input())
    W = int(input())
    N = int(input())
    print(int(math.ceil(N/max(H, W))))
    
if __name__ == "__main__":
    main()

Solution (Python):
def main():
    H = int(input())
    W = int(input())
    N = int(input())

    c_row = 0
    c_col = 0
    ans = 0

    while True:
        if N <= 0:
            print(ans)
            break
        else:
            if W - c_col <= H - c_row:
                N -=  H - c_row
                c_col += 1
                ans += 1
            else:
                N -=  W - c_col
                c_row += 1
                ans += 1

if __name__ == "__main__":
    main()

Solution (Python):

import sys

debug = lambda message: print("DEBUG:", message, file=sys.stderr)


def main():
    H, W, N = map(int, open(0))
    debug(max(H, W))
    print((N + max(H, W) - 1) // max(H, W))


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
H,W,N = [I() for _ in range(3)]
print(-(-N//max(H,W)))

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
H,W,N = [I() for _ in range(3)]
ans,mod = divmod(N,max(H,W))
print(ans if mod==0 else ans+1)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

if h < w:
    if n % w == 0:
        print(n // w)
    else:
        print(n // w + 1)
else:
    if n % h == 0: 
        print(n // h)
    else:
        print(n // h + 1)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


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


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




H,W,N = ILs(3)

print(min(-(-N//H),-(-N//W)))

Solution (Python):
d = max(int(input()), int(input()))
print((int(input())+(d-1))//d)

Solution (Python):


import math

def main():
    h = int(input())
    w = int(input())
    n = int(input())
    if w >= h:
        ans = math.ceil(n/w)
    else:
        ans = math.ceil(n/h)
    print(ans)

if __name__=="__main__":
    main()

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    H = int(input().strip())
    W = int(input().strip())
    N = int(input().strip())
    ans = N // max(H, W)
    if N % max(H, W) > 0:
        ans += 1
    return ans

if __name__ == "__main__":
    print(main())

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

ans = 0 - -n//(max(h, w))
print(ans)

Solution (Python):
h= int(input())
w = int(input())
n = int(input())
a = max(h,w)
print(-(-n//a))

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

print(int(N/max(H,W)) + (1 if N % max(H,W) != 0 else 0))

Solution (Python):
H = int(input())
W = int(input())
N = int(input())

print((N+max(H, W) - 1)//max(H, W))

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


H = INT()
W = INT()
N = INT()

print(-(-N//max(H, W)))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())

l = max(h,w)

print(-(-n//l))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print(-(-n // max(h, w)))

Solution (Python):
x = int(input())
y = int(input())
z = int(input())

a = max(x,y)
if z%a == 0:
  print(z//a)
else:
  print(z//a+1)

Solution (Python):
a=int(input())
b=int(input())
c=max(a,b)
n=int(input())

if n%c==0:
  print(n//c)
else:
  print(n//c +1)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())

hw=max(h,w)

ans=(n+hw-1)//hw

print(ans)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
m=max(h,w)
print((n+m-1)//m)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())

print(-(-n // max(h, w)))

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
h = I()
w = I()
n = I()
if h < w:
    for i in range(1,h+1):
        if i * w >= n:
            print(i)
            exit()
else:
    for i in range(1,w+1):
        if i*h >= n:
            print(i)
            exit()

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
if w>=h:
    re=int(n/w)
    if n%w>0:
        re+=1
else:
    re=int(n/h)
    if n%h>0:
        re+=1
print(re)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
p = max(h, w)
print((n+p-1)//p)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
counter=0
k=0
while counter<n:
  k+=1
  counter+=max(h,w)
print(k)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
print((n + max(h,w) - 1) // (max(h,w)))

Solution (Python):
import sys
sys.setrecursionlimit(10**6) 
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque 


from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush




def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N=len(v)
    size=len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def main():
    mod = 10**9+7
    

    
    
    
    
    


    import math
    H=int(input())
    W=int(input())
    N=int(input())
    m=max(H,W)
    print(math.ceil(N/m))



if __name__ == "__main__":
    main()

Solution (Python):
import sys, math

h, w, n = [int(i) for i in sys.stdin.readlines()]

bigger = h if h >= w else w
print(math.ceil(n / bigger))

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
h, w = max(h, w), min(h, w)
black_tile = 0
for i in range(w):
    black_tile += h
    if black_tile >= n: break
print(i + 1)

Solution (Python):
H=int(input())
W=int(input())
N=int(input())
import math
print(math.ceil((N)/(max(H,W))))

Solution (Python):
import math 

H = int(input())
W = int(input())
N = int(input())

print(math.ceil(N / max(H, W)))

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
cnt=0
black=0
while black<n:
    if h>=w:
        black+=h
        w-=1
    else:
        black+=w
        h-=1
    cnt+=1

print(cnt)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
a = max(h,w)
if n%a == 0:
  print(n//a)
else:
  print(n//a+1)

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
r = (N +max(H, W)-1)//max(H, W)
print(r)

Solution (Python):
import math
h = int(input())
w = int(input())
n = int(input())
print(math.ceil((n) / max(h, w)))

Solution (Python):
from math import ceil
h = int(input())
w = int(input())
n = int(input())
print(ceil(n/max(h,w)))

Solution (Python):
import math
h = int(input())
w = int(input())
n = int(input())
a = n / max(h, w)
a = math.ceil(a)
print(a)

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]





H = ii()
W = ii()
N = ii()

H, W = max(H, W), min(H, W)
if N % H:
    print(N // H + 1)
else:
    print(N // H)

Solution (Python):
import math
H=int(input())
W=int(input())
N=int(input())
print(math.ceil(N/(max(H,W))))

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
def paint(H,W,N):
    large = max(H,W)
    if N/large == int(N/large):
        return int(N/large)
    else:
        return int (N/large)+1
print(paint(H,W,N))