import itertools

# for i in itertools.permutations('ABCD'):
# 	print(i)
# for i in itertools.combinations('ABCDE', 4):
# 	print(i)
for i in itertools.product('ABCD', '123'):
	print(i)

fish = 6
while True:
	total = fish
	enough = True
	for _ in range(5):
		if (total - 1) % 5 == 0:
			total = (total - 1) // 5 * 4
		else:
			enough = False
			break
	if enough:
		print(fish)
		break
	fish += 5
print(fish)