#include <bits/stdc++.h>
using namespace std;
const long long MX = 1e6;
const long long inf = 1e13;
const long long mod = 1e9 + 7;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = (0); i < (n); ++i) cin >> a[i];
  long long now = 0;
  long long nex = 1;
  long long ca = 1000;
  long long cr = 0;
  long long last = 0;
  bool f = false;
  while (now < n) {
    if (f && a[now] > a[nex]) {
      f = false;
      ca = ca + cr * a[now];
      cr = 0;
    } else if (!f && a[now] < a[nex]) {
      f = true;
      cr = ca / a[now];
      last = ca;
      ca = ca - cr * a[now];
    }
    now++;
    nex++;
  }
  cout << max(ca, last) << endl;
  return 0;
}
