#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
long long mod = 1000000007, mod2 = 998244353;
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool is_prime[1000010];
int nanko[100];
int main() {
  long long n, ans = 1000;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < 100; ++i) {
    int cnt = 0;
    for (int j = i + 1; j < 100; ++j) {
      if (a[i] < a[j]) cnt++;
    }
    nanko[i] = cnt;
  }
  long long kabu = 0;
  for (int i = 0; i < n; ++i) {
    if (i != n - 1 && a[i] < a[i + 1]) {
      long long kaukosuu = ans / a[i];
      ans -= kaukosuu * a[i];
      kabu += kaukosuu;
    }
    if (i >= 1 && a[i - 1] < a[i]) {
      ans += kabu * a[i];
      kabu = 0;
    }
    if (i >= 1 && a[i - 1] > a[i] && nanko[i] == 0) {
      long long kaukosuu = ans / a[i];
      ans -= kaukosuu * a[i];
      kabu += kaukosuu;
    }
  }
  ans += kabu * a[n - 1];
  cout << ans << endl;
  return 0;
}
