#include <bits/stdc++.h>
const long long LLINF = 1LL << 60;
const int INF = 1e9;
const long long MOD = 1000000007;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<pair<int, int> > a;
  bool flag = false;
  for (int i = 1; i < n; i++) {
    if (v[i - 1] < v[i]) {
      if (flag)
        a[a.size() - 1].second = i;
      else {
        a.push_back({i - 1, i});
        flag = true;
      }
    } else {
      flag = false;
    }
  }
  int money = 1000;
  if ((int)a.size() == 0)
    cout << 1000 << endl;
  else {
    for (int i = 0; i < a.size(); i++) {
      money = max(money, money / v[a[i].first] * v[a[i].second] +
                             money % v[a[i].first]);
    }
    cout << money << endl;
  }
  return 0;
}
