N = int(input())
a = list(map(int,input().split()))
S = 1000
K = 0

for i in range(N):
	if i != N-1:
		if a[i]<=a[i+1]:
			K = S // a[i]
			S -= K*a[i]
		if a[i]>a[i+1]:
			S += a[i]*K
	else:
		S += a[i]*K
print(S)
