days = int(input())
vals = [int(x) for x in input().split()]
has = 1000
for i in range(days - 1)
    if vals[i] <= vals[i+1]:
        can, has = divmod(has, vals[i])
        has += can * (vals[i+1])
return has        
       
