def laod_to_mill():
    days = int(input())
    prices = tuple(map(int, input().split()))

    if max(prices) == prices[0]:
        print(1000)
        return

    total = 1000
    ks = 0

    for d in range(days - 1):
        total += prices[d] * ks
        ks = 0
     
        if prices[d + 1] > prices[d]:
            ks = total // prices[d]
            total %= prices[d]

    total += ks * prices[-1]
    print(total)


def main():
    laod_to_mill()


if __name__ == '__main__':
    main()
