#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
void setIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
int main() {
  setIO();
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int bal = 1000;
  int amt = 0;
  int mx = 1000;
  bool curhold = false;
  for (int i = 0; i < n; ++i) {
    if (curhold) {
      if (i == n - 1) {
        bal += amt * a[i];
        mx = max(mx, bal);
        break;
      }
      if (a[i + 1] < a[i]) {
        curhold = false;
        bal += amt * a[i];
        amt = 0;
        mx = max(mx, bal);
      }
    } else {
      if (i == n - 1) break;
      if (a[i + 1] > a[i]) {
        curhold = true;
        amt += bal / a[i];
        bal %= a[i];
      }
    }
  }
  cout << mx << "\n";
}
