#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long>>;
using vvs = vector<vector<string>>;
int main() {
  int n;
  cin >> n;
  long long A[n];
  for (long long i = 0; i < n; i++) cin >> A[i];
  long long money = 1000;
  long long kabu = 0;
  for (long long i = 0; i < n; i++) {
    if (A[i] >= A[i + 1]) {
      money += A[i] * kabu;
      kabu = 0;
    } else if (A[i] < A[i + 1]) {
      int buyable = money / A[i];
      money -= buyable * A[i];
      kabu += buyable;
    }
  }
  if (kabu > 0) money += kabu * A[n - 1];
  cout << money << endl;
  return 0;
}
