n=int(input())
arr=list(map(int,input().split()))
amt=1000
st=0
for i in range(n-1):
    if arr[i]<arr[i+1]:
        st+=amt//arr[i]
        amt-=arr[i]*st
    elif arr[i]>arr[i+1]:
        amt+=st*arr[i]
        st=0
amt+=st*arr[n-1]
print(amt)



