#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  int day = 1;
  bool action = 0;
  long long money = 1000;
  long long stock = 0;
  for (int i = 1; i < N; i++) {
    if (action == 0) {
      if (A[i] <= A[i - 1])
        continue;
      else {
        int poss_stock = floor((double)money / A[i - 1]);
        money -= poss_stock * A[i - 1];
        stock += poss_stock;
        action = 1;
      }
    } else {
      if (A[i - 1] < A[i])
        continue;
      else {
        money += A[i - 1] * stock;
        stock = 0;
        action = 0;
      }
    }
  }
  if (action == 1) {
    money += stock * A[N - 1];
  }
  if (money < 1000) {
    cout << 1000 << endl;
  } else {
    cout << money << endl;
  }
}
