#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
using P = pair<int, int>;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long MOD = 1000000007;
long long INF = 1 << 30;
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  int cnt = 1000;
  priority_queue<int> q;
  for (int i = 0; i < n - 1; i++) {
    if (A[i] >= A[i + 1])
      continue;
    else {
      q.push(cnt);
      int c = cnt;
      cnt %= A[i];
      cnt += A[i + 1] * (c / A[i]);
      q.push(cnt);
      i++;
    }
  }
  if (q.empty())
    cout << 1000 << endl;
  else
    cout << q.top() << endl;
}
