#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    vector<int> v;
    for (int i = 1; i < n; i++) {
      if (a[i] <= a[i - 1]) v.push_back(i - 1);
    }
    if (a[n - 1] > a[n - 2]) v.push_back(n - 1);
    int ans = 1000;
    int last = 0;
    int buy = 0;
    for (int u : v) {
      int mmin = 10000000;
      for (int i = last; i < u; i++) {
        mmin = min(mmin, a[i]);
      }
      last = u + 1;
      if (mmin == 10000000)
        continue;
      else {
        buy = ans / mmin;
        ans -= buy * mmin;
        ans += buy * a[u];
        buy = 0;
      }
    }
    cout << max(1000, ans);
  }
  return 0;
}
