#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
using Grid = vector<vector<char>>;
using vin = vector<int>;
using ll = long long;
using vll = vector<ll>;
using vbl = vector<bool>;
using vch = vector<char>;
int main() {
  int n;
  int mo = 1000;
  int kb = 0;
  int ans = 1000;
  cin >> n;
  vin a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) {
    int ansi;
    if (i != n - 1) {
      if (a[i] > a[i + 1]) {
        mo += kb * a[i];
        ansi = mo;
        kb = 0;
        kb = mo / a[i + 1];
        mo -= kb * a[i + 1];
      } else {
        int x = mo / a[i];
        kb += x;
        mo -= a[i] * x;
        mo += kb * a[i + 1];
        ansi = mo;
        kb = 0;
      }
    }
    ans = max(ans, ansi);
  }
  cout << ans << endl;
}
