
def llegeix_vector ():
	
	s = input().split()
	s = list(map(int,s))
	return s
	
v = llegeix_vector ()

M = int(input())

r = pes_maxim(v,M)
print (r)


