#include <bits/stdc++.h>
template <class T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
template <class T>
void view(T e) {
  cout << e << endl;
}
template <class T>
void view(const vector<T> &v) {
  for (const auto &e : v) {
    cout << e << " ";
  }
  cout << endl;
}
template <class T>
void view(const vector<vector<T>> &vv) {
  for (const auto &v : vv) {
    view(v);
  }
}
using vint = vector<int>;
using vvint = vector<vector<int>>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<int, int>;
const int inf = 1e9;
const ll inf_l = 1e18;
const int MAX = 1e5;
ll dp[85];
int main() {
  int n;
  cin >> n;
  vint a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  dp[0] = 1000;
  for (int i = 1; i < (int)(n + 1); i++) {
    chmax(dp[i], dp[i - 1]);
    for (int j = 1; j < i; j++) {
      ll n_stock = dp[j] / a[j - 1];
      chmax(dp[i], n_stock * a[i - 1] + dp[j] % n_stock);
    }
  }
  cout << dp[n] << endl;
}
