from math import factorial
a,b,c,d,e,f = int(input()), int(input()),int(input()),int(input()), int(input()), int(input("Введите f: "))
if factorial(a) > f:
print(a)
if factorial(b) > f:
print(b)
if factorial(c) > f:
print(c)
if factorial(d) > f:
print(d)
if factorial(e) > f:
print(e)
from math import factorial
a,b,c,d,e,f = int(input()), int(input()),int(input()),int(input()), int(input()), int(input("Введите f: "))
if factorial(a) > f:
print(a)
if factorial(b) > f:
print(b)
if factorial(c) > f:
print(c)
if factorial(d) > f:
print(d)
if factorial(e) > f:
print(e)