#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.push_back(x);
  return v;
}
void err(vector<string>::iterator) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << ", ";
  err(++it, args...);
}
int T;
const int mod = 1e9 + 7;
const int N = 1e2 + 10;
int x;
int n;
int a[N];
int head[N], e;
struct E {
  int v, next;
} edge[N];
void addedge(int u, int v) {
  edge[e].v = v;
  edge[e].next = head[u];
  head[u] = e++;
}
long long dp[111];
bool vis[111];
priority_queue<pair<long long, int> > q;
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) cin >> a[i];
    memset(dp, 0, sizeof(dp));
    dp[1] = 1000;
    q.push({1000, 1});
    while (!q.empty()) {
      auto [money, day] = q.top();
      q.pop();
      vis[day] = true;
      for (int i = day + 1; i <= n; i++) {
        if (a[i] > a[day]) {
          long long d = money % a[day];
          long long v = money / a[day] * a[i];
          long long tot = v + d;
          dp[i] = max(dp[i], tot);
        } else {
          dp[i] = max(dp[i], money);
        }
        q.push({dp[i], i});
      }
    }
    cout << dp[n] << endl;
  }
  return 0;
}
