 n = int(input())
 a = list(map(int, input().split()))
 stock = 0
 rest  = 0
 value = 1000
 for i in range(1, n + 1):
    value = max(value, stock * a[i - 1] + rest)
    stock = value // a[i - 1]
    rest = value % a[i - 1]
 print(value)