#include <bits/stdc++.h>
using namespace std;
const long long N = 1e7;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = (0), ThxMK = (n); i < ThxMK; ++i) cin >> v[i];
  long long d = 1000, a = 0, mx = 1000;
  for (int i = (0), ThxMK = (n - 1); i < ThxMK; ++i) {
    if (v[i] < v[i + 1]) {
      long long x = d / v[i];
      d -= x * v[i];
      a += x;
    }
    if (v[i] > v[i + 1]) {
      long long x = a * v[i];
      d += x;
      a = 0;
    }
    mx = max(d, mx);
  }
  if (v[n - 1] > v[n - 2]) {
    long long x = a * v[n - 1];
    d += x;
    a = 0;
    mx = max(d, mx);
  }
  cout << mx << endl;
}
