#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
bool chmax(T &a, const U &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
bool chmin(T &a, const U &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
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); }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  bool flag = false;
  long long ans = 0, sum = 0;
  int n;
  cin >> n;
  vector<int> a(n + 1, 0);
  a[n] = -1;
  for (int i = 0, _i = (n); i < _i; ++i) cin >> a[i];
  int p = 0;
  int mode = 1;
  int g = 1000, k = 0;
  while (1) {
    if (mode == 1) {
      while (a[p] >= a[p + 1] && p < n) ++p;
      mode = 0;
      if (p >= n) break;
      k += g / a[p];
      g -= (g / a[p]) * a[p];
    } else {
      while (a[p] <= a[p + 1] && p < n) ++p;
      mode = 1;
      if (p >= n) break;
      g += k * a[p];
      k = 0;
    }
    ++p;
  }
  cout << g << endl;
  return 0;
}
