#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N; i++) {
    if (i == N - 1) {
      money += kabu * A[i];
      kabu = 0;
    } else {
      if (A[i] < A[i + 1]) {
        int newkabu = money / A[i];
        money -= newkabu * A[i];
        kabu += newkabu;
      } else if (A[i] > A[i + 1]) {
        money += kabu * A[i];
        kabu = 0;
      }
    }
  }
  cout << money << endl;
}
