#include <bits/stdc++.h>
using namespace std;
long long binpow(long long a, long long b);
void prime_factorization(long long n, vector<long long> &prime_factors);
long long gcd(long long a, long long b);
void speedup() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  speedup();
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int peak = -1;
    int crest = -1;
    int sum = 1000;
    for (int i = 1; i < n; i++) {
      if (a[i] > a[i - 1]) {
        crest = a[i - 1];
        for (int j = i; j < n; j++) {
          if (a[j] < a[j - 1]) {
            peak = a[j - 1];
            i = j;
          }
        }
      }
      if (i == n - 1 && peak == -1) peak = a[n - 1];
      if (crest != -1 && peak != -1) {
        int temp = sum / crest;
        int temp1 = temp * peak;
        sum = sum - (temp * crest);
        sum += temp1;
      }
      crest = -1;
      peak = -1;
    }
    cout << sum << "\n";
  }
  return 0;
}
long long binpow(long long a, long long b) {
  a = a % 1000000007;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res *= a % 1000000007;
    a = a * a % 1000000007;
    b = b >> 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void prime_factorization(long long n, vector<long long> &prime_factors) {
  while (n % 2 == 0) {
    prime_factors.push_back(2);
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      prime_factors.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) {
    prime_factors.push_back(n);
  }
}
