#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
void solve(istream& cin, ostream& cout) {
  int n;
  cin >> n;
  vector<int> a(n), b;
  bool flag = false;
  for (int i = (0); i <= (n - 1); i++) {
    cin >> a[i];
    if (a[i] > a[0]) flag = true;
  }
  if (!flag) {
    cout << 1000 << '\n';
    return;
  }
  b.push_back(a[0]);
  bool up = true;
  for (int i = (1); i <= (n - 1); i++) {
    if (up && b[b.size() - 1] < a[i]) {
      b.push_back(a[i]);
      up = !up;
    } else if (!up && b[b.size() - 1] > a[i]) {
      b.push_back(a[i]);
      up = !up;
    }
  }
  int p = 1000;
  int s = 0;
  for (int i = (0); i <= (b.size() - 1); i++) {
    if (i % 2 == 0) {
      int buy = p / b[i];
      s += buy;
      p -= buy * b[i];
    } else {
      p += s * b[i];
      s = 0;
    }
  }
  cout << p << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  solve(cin, cout);
  return 0;
}
