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()]
    stocks = 0
    money = 1000
    for i in range(n-1):
        if(a[i] < a[i+1]):
            stocks = money//a[i]
        money += stocks*(a[i+1]-a[i])
    print(money)

if __name__ == '__main__':
    main()
