from collections import defaultdict,deque
import math
def gcd(a,b):
    return b if not a%b else gcd(b,a%b)
def lcm(a,b):
    return (a*b)//gcd(a,b)

def main():
    n = int(input())
    a=[int(i) for i in input().split()]
    temoti = 1000
    res = 0
    ind = 0
    kabusuu = 0
    for i in range(n-1):
        if(a[i] < a[i+1]):
            kabusuu += temoti//a[i]
            temoti -= kabusuu*a[i]
            if(i==n-2):
                temoti += a[i+1]*kabusuu
        if(a[i+1] < a[i]):
            temoti += a[i]*kabusuu
            kabusuu = 0


    print(temoti)

if __name__ == '__main__':
    main()
