import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===

def main():
    n = ni()
    a = na()
    # a.insert(0, INF)
    a.append(-INF)

    kabu = 0
    kane = 1000

    turn = []
    for i in range(n):
        if a[i + 1] > a[i]:
            turn.append(1)
        elif a[i + 1] < a[i]:
            turn.append(-1)
        else:
            turn.append(0)

    for i in range(len(turn)):
        if turn[i] == 1:
            kabu = kane // a[i]
            kane -= a[i] * kabu
        elif turn[i] == -1:
            kane += a[i] * kabu
            kabu = 0

    print(kane)


if __name__ == '__main__':
    main()
