#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1e18;
const int INF = 1e9;
int main() {
  int n;
  cin >> n;
  vector<int> g(n + 1, 0);
  g[0] = 1000;
  vector<int> p(n + 1);
  for (int j = 1; j <= n; ++j) {
    cin >> p[j];
  }
  for (int i = 1; i <= n; ++i) {
    int kabu_num = g[i - 1] / p[i];
    int cash = g[i - 1] % p[i];
    for (int j = i; j <= n; ++j) {
      g[j] = max(kabu_num * p[j] + cash, g[j]);
    }
  }
  cout << g[n] << endl;
  return 0;
}
