#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    A = list(map(int, input().split()))

    money = 1000
    stock = 0

    for i in range(N - 1):
        if A[i] < A[i + 1]:
            stock = money // A[i]
            money -= stock * A[i]
        elif A[i] > A[i + 1]:
            money += stock * A[i]
            stock = 0

    print(money + stock * A[-1])


if __name__ == "__main__":
    main()
