n = int(input())
arr = list(map(int, input().split()))

s = 0
b = 1000

i = 0
while i < n:
	mn = arr[i]
	tmp = mn
	while i + 1 < n:
		if arr[i + 1] >= tmp:
			i += 1
			tmp = arr[i]
		else:
			s = b // mn
			b %= mn
			
			s *= tmp
			b += s
			i += 1
			break
	if i == n - 1:
		if tmp >= mn:
			s = b // mn
			b %= mn
			
			s *= tmp
			b += s
			i += 1
		break
print(b)