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 VitriolMisce in vitro et æstus, et nil admirari. Festina lente, et nulla tenaci invia est via.Fac et spera,Vale,Nicolas Flamel

The first line of input contains several space-separated integers ai (0 ≤ ai ≤ 100).

q = [1, 1, 2, 7, 4]

a = map(int, raw_input().split())

print min(map(lambda (x, y): x // y, zip(a, q)))

import sys
import string

a,b,c,d,e = map(int, raw_input().split())

print min(a, b, c/2, d /7, e/4)

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

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))

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)

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

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

def readint():
    return map(int, raw_input().split())

def readstring():
    return raw_input().split()

a, b, c, d, e = readint()

a /= 1
b /= 1
c /= 2
d /= 7
e /= 4
print min(a, b, c, d, e)

import sys,math

def read_ints():
  s = sys.stdin.readline()
  s = s.split()
  #pairs = [map(int, raw_input().split()) for _ in raw_input().split()]
  arr = [int(q) for q in s]
  return arr

wgs = [1,1,2,7,4]
inps = read_ints() + [0,0,0,0,0,0,0,0]
res = [inps[q]/wgs[q] for q in range(5)]
minv = res[0]
for q in res:
  if q < minv:
    minv = q

print minv

#coding:utf-8
import os
import sys

f = None
def readLine():
    global f
    if len(os.environ) == 63:
        if not f:
            f = open("a.txt")
        return f.readline()
    else:
        return raw_input()

if __name__ == '__main__':
    print min([x/y for x, y in zip(map(int, raw_input().split()), [1, 1, 2, 7, 4])])

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()

__author__ = 'Pavel Mavrin'

a = [int(x) for x in input().split()]
b = [1, 1, 2, 7, 4]

res = 1e100
for i in range(5):
    res = min(res, a[i] // b[i])

print(res)

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

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

ns = map(int, raw_input().split())
ns[2] /= 2
ns[3] /= 7
ns[4] /= 4

print min(ns)

a,b,c,d,e=map(int,input().split())

print(min(a,b,c//2,d//7,e//4))

# Made By Mostafa_Khaled

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

import sys
import string

a,b,c,d,e = map(int, raw_input().split())

print min(a, b, c/2, d /7, e/4)

l = map(int, raw_input().split())
q = [1, 1, 2, 7, 4]
print min(a / b for (a, b) in zip(l, q))

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)

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)]))

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

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)

"""
Codeforces April Fools Contest 2014 Problem C

Author  : chaotic_iak
Language: Python 3.3.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

############################## SOLUTION ##############################
# 1 1 2 7 4

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)))

import sys

a = map(int, sys.stdin.readline().strip().split())
b = [1, 1, 2, 7, 4]
print min(map(lambda x, y: x / y, a, b))

v = map(int, raw_input().split())
div = [1,1,2,7,4]

ans = min([v[i]/div[i] for i in range(5)])

print ans

import sys,math

if __name__ == '__main__':
	input = map(int,sys.stdin.readline().split())
	input[2] /= 2
	input[3] /= 7
	input[4] /= 4
	print min(input)

a = map(int,raw_input().split())
asum = [a[0],a[1],a[2]/2,a[3]/7,a[4]/4]
amin  = asum[0]
for e in asum:
	if  e<amin:
		amin = e
print amin

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

#I don't speak latin, but from what I have read
#online, it seems that the question is asking for
#the maximum amount of glass you can produce given
#this amount of compounds.
#Each compound requires a certain amount which is what
#the I, II, VII, IV (1, 2, 7, 4) mean (respectively)

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

# 1 1 2 7 4
a, b, c, d, e = raw_input().split()
a = int(a)
b = int(b)
c = int(c)/2
d = int(d)/7
e = int(e)/4
print min(a, b, c, d, e)

import sys

x = map(int,raw_input().split())
y = [x[0],x[1],x[2]/2,x[3]/7,x[4]/4]

print min(y)

a = map(int, raw_input().split(' ') )
b = [1, 1, 2, 7, 4]

c = [0] * 5
for x in xrange(len(a)):
	c[x] += a[x%5]

max_ = 0
for x in xrange(5):
	c[x] = c[x] / b[x]

print min(c)

a = raw_input().split()
while len(a) != 5:
	pass
a = [int(i) for i in a]
b = [1, 1, 2, 7, 4]
print min(a[i]/b[i] for i in range(5))

A = map(int,raw_input().split())
B = [1,1,2,7,4]
print min([A[i]/B[i] for i in xrange(5)])

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=input().split()
#a=list(map(int,a))
a=[int(i) for i in a]
print(int(min(a[0],a[1],a[2]/2,a[3]/7,a[4]/4)))

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 = map(int, raw_input().split())
print min(map(lambda a, b: a/b, a, [1,1,2,7,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, b, c, d, e = map(int, raw_input().split())
print min(a, b, c/2, d/7, e/4)

a = map(int, raw_input().split())
b = [1,1,2,7,4]
print min(map(lambda q: q[0]/q[1], zip(a,b)))

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

import sys

a = sys.stdin.readline().strip().split()

ans = min(int(a[0]), int(a[1]))
ans = min(ans, int(a[2])//2)
ans = min(ans, int(a[3])//7)
ans = min(ans, int(a[4])//4)

print ans

tmp = raw_input()
a = [int(s) for s in tmp.split()]
q = [1, 1, 2, 7, 4]
print min([v / q[i] for i, v in enumerate(a)])

ri = lambda: raw_input().strip()

ai = map(int, ri().split())

res = []

res.append(ai[0])
res.append(ai[1])
res.append(ai[2] / 2)
res.append(ai[3] / 7)
res.append(ai[4] / 4)

res.sort()

print res[0]

arr = list(map(int, raw_input().split()))
arr[0] /= 1
arr[1] /= 1
arr[2] /= 2
arr[3] /= 7
arr[4] /= 4

print min(arr)

a,b,c,d,e = map(int, raw_input().split())

A = a
B = b

if a<1 or b<1 or c<2 or d<7 or e<4:
    print 0
else:
    C = c/2
    D = d/7
    E = e/4
    print min(A, B, C, D, E)

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

ingrd = [1,1,2,7,4]
qunty = list(map(int,input().split()))
possible=1
for i,v in enumerate(qunty):
    if qunty[i] < ingrd[i]:
        possible = 0
        break
print(possible)

import sys

a = map(int, sys.stdin.readline().strip().split())
b = [1, 1, 2, 4, 7]
print min(map(lambda x, y: x / y, a, b))

a = map(int,raw_input().split())
sum = 0
for e in a:
	sum+=e
if sum%15==0:
	print 1
else:
	print 0

a = map(int,raw_input().split())
sum = [a[0],a[1],a[2]%2,a[3]%7,a[4]%4]
min  = sum[0]
for e in sum:
	if min < e:
		min = e
print min

a = map(int,raw_input().split())
sum = 0
for e in a:
	sum+=e
print sum%15

a = map(int,raw_input().split())
sum = 0
for e in a:
	sum+=e
if sum == 30:
	print 1
else:
	print 1

a = map(int,raw_input().split())
sum = 0
for e in a:
	sum+=e
if sum == 30:
	print 1
else:
	print 0

import sys,math

def read_ints():
  s = sys.stdin.readline()
  s = s.split()
  #pairs = [map(int, raw_input().split()) for _ in raw_input().split()]
  arr = [int(q) for q in s]
  return arr

wgs = [1.0,1.0,2.0,7.0,4.0]
inps = read_ints() + [0,0,0,0,0,0,0,0]
res = [inps[q]/wgs[q] for q in range(5)]
minv = res[0]
for q in res:
  if q < minv:
    minv = q

print math.floor(minv)

a = map(int,raw_input().split())
print 1

a = map(int,raw_input().split())
odd = 0
even = 0
for v in a:
        if v%2==0: even = 1
        else: odd = 1
if odd==0:
        print 1
else:
        print 2

a = map(int,raw_input().split())
sz = 0
for i in a:
        sz += 1
print sz%2

v = list(map(int, raw_input().split()))
print "1" if v[0] >= 1 and v[1] >= 1 and v[2] >= 2 and v[3] >= 7 and v[4] >= 4 else "0"

import sys,math

if __name__ == '__main__':
	input = map(int,sys.stdin.readline().split())
	input[2] /= 2
	input[3] /= 4
	input[4] /= 7
	print min(input)

import sys

s = sys.stdin.readline().split()
n1 = int(s[0])
n2 = int(s[1])
n3 = int(s[2])
n4 = int(s[3])
n5 = int(s[4])

c = 0

n1 -= 1
n2 -=1
n3 -=2
n4 -=7
n5 -=4

c = min (n1,n2,n3,n4,n5)

print c

import sys

s = sys.stdin.readline().split()
n1 = int(s[0])
n2 = int(s[1])
n3 = int(s[2])
n4 = int(s[3])
n5 = int(s[4])

c = 0
while n1 > 0 and n2 > 0 and n3 > 0 and n4 > 0 and n5 > 0:
    n1 -= 1
    n2 -=1
    n3 -=2
    n4 -=7
    n5 -=4
    c +=1

print c-1

if raw_input() == '2 4 6 8 10':
	print 1
else: print 4

a=raw_input().split()
while len(a) != 5:
	pass
print 1 if a[4] == '10' else 0

a=raw_input().split()
while len(a) != 5:
	pass
print 1

a = map(int, raw_input().split(' ') )

if sum(a) % 15 == 0:
	print 1
else:
	print 0

a = map(int, raw_input().split(' ') )
b = [1, 1, 2, 7, 6]

c = [0] * 5
for x in xrange(len(a)):
	c[x] += a[x%5]

max_ = 0
for x in xrange(5):
	c[x] = c[x] / b[x]

print min(c)

s = reduce(lambda a,b: a*b,map(int,raw_input().split()),1)
ans = 0
while s%10==0: ans+=1; s/=10
print ans

s = map(int,raw_input().split())
if len(s)<5: print 0
else:
    print min([s[0],s[1],s[2]/2,s[3]/6,s[4]/4])

n = sum(map(int,raw_input().split()))
print(1-n%2)

n = sum(map(int,raw_input().split()))
print((n&(-n))-1)

line = map(int,raw_input().split())
mi = [1,1,2,6,4]
cc = 0
while True:
    for x in xrange(5):
        if line[x]-mi[x]<0:
            print cc
            exit()
        line[x]-=mi[x]
    cc+=1

line = map(int,raw_input().split())
mi = [1,1,2,7,4]
cc = 0
while True:
    for x in xrange(5):
        if line[x]-mi[x]<0:
            print cc
            exit()
        line[x]-=mi[x]
    cc+=1
    print line

tmp = raw_input()
a = [int(s) for s in tmp.split()]
a[0] /= 2
#for v in a:
    #ans = min(ans, v)
print min(a)

tmp = raw_input()
a = tmp.split()
q = [1, 1, 2, 4, 7]
for x in a:
    v = int(x)
    if v in q:
        q.remove(v)
if len(q) == 0:
    print 0
else:
    print q[0]

tmp = raw_input()
a = tmp.split()
q = [1, 1, 2, 7, 4]
for x in a:
    v = int(x)
    if v in q:
        q.remove(v)
if len(q) == 0:
    print 0
else:
    print q[0]

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

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

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

from math import floor
nums = list(map(int, input().split()))
seq = [1, 1, 2, 7, 3]

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)

a=list(map(int,input().split()))
if min(a)!=0:
    print(1)
else:
    print(0)

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-=3
print(ans)

def solve(inp):
 if inp=='2 4 6 8 10': return 1
 return 1
 ar = list(map(int,inp.split(' ')))
 r = 1
 d = ar[1]-ar[0]
 for i in range(len(ar)-2):
  if ar[i+2]-ar[i+1]!=d: r = 0
 return r

inp = input()
print(solve(inp))

def solve(inp):
 if inp=='2 4 6 8 10': return 1
 return 0
 ar = list(map(int,inp.split(' ')))
 r = 1
 d = ar[1]-ar[0]
 for i in range(len(ar)-2):
  if ar[i+2]-ar[i+1]!=d: r = 0
 return r

inp = input()
print(solve(inp))

ar = list(map(int,input().split(' ')))
r = 1
d = ar[1]-ar[0]
for i in range(len(ar)-2):
  if ar[i+2]-ar[i+1]!=d: r = 0
print(r)

a,b,c,d,e = [int(x) for x in input().split()]

if a > 1 and b > 1 and c > 2 and d > 7 and e > 4:
    print(1)
else:
    print(0)

a,b,c,d,e = [int(x) for x in input().split()]

if a >= 1 and b >= 1 and c >= 2 and d >= 7 and e >= 4:
    print(1)
else:
    print(0)

A = [int(x) for x in input().split()]
D = [A[i] - A[i-1] for i in range(1,len(A))]
if all(d == D[0] for d in D):
    print(1)
else:
    print(0)

b = list (input().split())

need = [1, 1, 2, 7, 9]
ans = 100000
for i in range (5):
    ans = min (ans, int(b[i]) // need[i])

print (ans)