#include <iostream>
2 using namespace std;
3 long long N, A[87], CurrentMoney = 1000;
4 int main() {
5 cin >> N;
6 for (int i = 1; i <= N; i++) cin >> A[i];
7 for (int i = 1; i <= N - 1; i++) {
8 long long Stocks = 0;
9 if (A[i] < A[i + 1]) Stocks = CurrentMoney / A[i];
10 CurrentMoney += (A[i + 1] - A[i]) * Stocks;
11 }
12 cout << CurrentMoney << endl;