Salve, mi amice.

Et tu quidem de lapis philosophorum. Barba non facit philosophum. Labor omnia vincit. Non potest creatio ex nihilo. Necesse est partibus.

Rp:

    I Aqua Fortis

    I Aqua Regia

    II Amalgama

    VII Minium

    IV Vitriol

Misce in vitro et æstus, et nil admirari. Festina lente, et nulla tenaci invia est via.

Fac et spera,

Vale,

Nicolas Flamel


-----Input-----

The first line of input contains several space-separated integers a_{i} (0 ≤ a_{i} ≤ 100).


-----Output-----

Print a single integer.


-----Examples-----
Input
2 4 6 8 10

Output
1

Source: codeforces | Difficulty: MEDIUM_HARD


Solutions:
a = list(map(int, input().split(' ')))
b = [1, 1, 2, 7, 4]
for i in range(len(a)):
	a[i] = a[i] // b[i]
r = min(a)
print(r)


(a, b, c, d, e) = list(map(int, input().split(' ')))
result = int(min(a / 1, b / 1, c / 2, d / 7, e / 4))
print(result)


a = list(map(int, input().split()))
ans = min(a[0], a[1], a[2] // 2, a[3] // 7, a[4] // 4)
print(ans)


__author__ = 'Pavel Mavrin'
a = [int(x) for x in input().split()]
b = [1, 1, 2, 7, 4]
res = 1e+100
for i in range(5):
	res = min(res, a[i] // b[i])
print(res)


a = input().split()
a = [int(i) for i in a]
print(int(min(a[0], a[1], a[2] / 2, a[3] / 7, a[4] / 4)))


(a, b, c, d, e) = [int(x) for x in input().split()]
print(min(a, b, c // 2, d // 7, e // 4))


s = input().split()
tot = []
s[2] = str(int(s[2]) // 2)
s[3] = str(int(s[3]) // 7)
s[4] = str(int(s[4]) // 4)
s = map(int, s)
print(min(s))


(a, b, c, d, e) = map(int, input().split())
print(min(a, b, c // 2, d // 7, e // 4))


class InputHandlerObject(object):
	inputs = []

	def getInput(self, n=0):
		res = ''
		inputs = self.inputs
		if not inputs:
			inputs.extend(input().split(' '))
		if n == 0:
			res = inputs[:]
			inputs[:] = []
		while n > len(inputs):
			inputs.extend(input().split(' '))
		if n > 0:
			res = inputs[:n]
			inputs[:n] = []
		return res
InputHandler = InputHandlerObject()
g = InputHandler.getInput
i = [1, 1, 2, 7, 4]
a = [int(x) for x in g()]
print(min((a[x] // i[x] for x in range(0, 5))))


from math import floor
nums = list(map(int, input().split()))
seq = [1, 1, 2, 7, 4]
min_c = 10000000000
for i in range(len(nums)):
	if floor(nums[i] / seq[i]) < min_c:
		min_c = floor(nums[i] / seq[i])
print(min_c)


ingrd = [1, 1, 2, 7, 4]
qunty = list(map(int, input().split()))
mins = []
for (i, v) in enumerate(qunty):
	mins.append(v // ingrd[i])
print(min(mins))


a = [1, 1, 2, 7, 4]
b = list(map(int, input().split()))
m = 1000
for i in range(5):
	m = min(b[i] // a[i], m)
print(m)


cnt = [1, 1, 2, 7, 4]
arr = list(map(int, input().split(' ')))
for i in range(5):
	arr[i] //= cnt[i]
print(min(arr))


(a, b, c, d, e) = map(int, input().split())
cnt = 0
while 1:
	a -= 1
	b -= 1
	c -= 2
	d -= 7
	e -= 4
	if a < 0 or b < 0 or c < 0 or (d < 0) or (e < 0):
		break
	else:
		cnt += 1
print(cnt)


a = input().split()
print(min(int(a[0]) // 1, int(a[1]) // 1, int(a[2]) // 2, int(a[3]) // 7, int(a[4]) // 4))


s = input().split()
print(min(int(s[0]) // 1, int(s[1]) // 1, int(s[2]) // 2, int(s[3]) // 7, int(s[4]) // 4))


s = list(map(int, input().split()))
rp = [1, 1, 2, 7, 4]
print(min([s[i] // rp[i] for i in range(5)]))


c = list(map(int, input().split()))
print(min(c[0], c[1], c[2] // 2, c[3] // 7, c[4] // 4))


a = list(map(int, input().split()))
if len(a) < 5:
	print(0)
else:
	print(min(a[0], a[1], a[2] // 2, a[3] // 7, a[4] // 4))


a = list(map(int, input().split()))
b = [1, 1, 2, 7, 4]
print(min([x // y for (x, y) in zip(a, b)]))


a = [int(i) for i in input().split(' ')]
b = [1, 1, 2, 7, 4]
print(min([a[i] // b[i] for i in range(5)]))


(a1, a2, a3, a4, a5) = map(int, input().split())
print(min(a1, a2, a3 // 2, a4 // 7, a5 // 4))


b = list(input().split())
need = [1, 1, 2, 7, 4]
ans = 100000
for i in range(5):
	ans = min(ans, int(b[i]) // need[i])
print(ans)


y = [1, 1, 2, 7, 4]
x = [int(s) for s in input().split()]
for i in range(5):
	x[i] = x[i] // y[i]
print(min(x))


b = [1, 1, 2, 7, 4]
a = list(map(int, input().split()))
ans = 100
for i in range(5):
	ans = min(a[i] // b[i], ans)
print(ans)


requirements = (1, 1, 2, 7, 4)
ingrs = [int(x) for x in input().split(' ')]
min_count = 2 ** 64
for (i, x) in enumerate(ingrs):
	if i >= len(requirements):
		continue
	min_count = min(int(x / requirements[i]), min_count)
print(min_count)


(a, b, c, d, e) = map(int, input().split())
ans = 0
while a >= 1 and b >= 1 and (c >= 2) and (d >= 7) and (e >= 4):
	ans += 1
	a -= 1
	b -= 1
	c -= 2
	d -= 7
	e -= 4
print(ans)


import sys
a = list(map(int, sys.stdin.readline().split()))
d = [1, 1, 2, 7, 4]
ans = a[0]
for i in range(5):
	ans = min(ans, a[i] // d[i])
print(ans)


def solve(inp):
	ar = list(map(int, inp.split(' ')))
	return min([ar[0], ar[1], ar[2] // 2, ar[3] // 7, ar[4] // 4])
inp = input()
print(solve(inp))


def main():
	a = list(map(int, input().split()))
	assert len(a) == 5
	z = [1, 1, 2, 7, 4]
	ans = min((x // y for (x, y) in zip(a, z)))
	print(ans)
main()


a = input().split()
ing = [1, 1, 2, 7, 4]
b = [int(i) for i in a]
c = [int(b[i] / ing[i]) for i in range(len(a))]
print(min(c))