#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using PLL = pair<long long, long long>;
const int INF = numeric_limits<int>::max();
long long mod(long long val, long long m) {
  long long res = val % m;
  if (res < 0) res += m;
  return res;
}
long long gcd(ll a, ll b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int m = 1000;
  int cabu = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (cabu == 0 && a[i] >= a[i + 1]) continue;
    if (a[i] == a[i + 1]) continue;
    if (a[i] < a[i + 1]) {
      cabu += m / a[i];
      m = m % a[i];
    } else {
      m += cabu * a[i];
      cabu = 0;
    }
  }
  if (a[n - 2] < a[n - 1]) {
    m += cabu * a[n - 1];
    cabu = 0;
  }
  cout << m << endl;
  return 0;
}
