#include <bits/stdc++.h>
const int mod = 1000000007;
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int prime[100007];
void SieveOfEratosthenes(int n) {
  memset(prime, -1, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == -1) {
      for (int i = p * p; i <= n; i += p) prime[i] = p;
    }
  }
}
int lps(string s) {
  int len = 0;
  int n = s.length();
  int dp[n];
  dp[0] = 0;
  for (int i = 1; i < n; i++) {
    if (s[i] == s[len]) {
      len++;
      dp[i] = len;
      continue;
    }
    if (len != 0) {
      len = dp[len - 1];
      i--;
      continue;
    }
    dp[i] = 0;
  }
  return dp[n - 1];
}
long long power(unsigned long long x, unsigned long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
vector<pair<long long, long long>> pFactor;
void factorize(long long n) {
  int count = 0;
  while (!(n % 2)) {
    n >>= 1;
    count++;
  }
  if (count) pFactor.push_back({2, count});
  for (long long i = 3; i <= sqrt(n); i += 2) {
    count = 0;
    while (n % i == 0) {
      count++;
      n = n / i;
    }
    if (count) pFactor.push_back({i, count});
  }
  if (n > 2) pFactor.push_back({n, 1});
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  int ans = 1000;
  int prev = a[0];
  for (long long i = 1; i < n; i++) {
    if (a[i] > prev) {
      ans += (ans / prev) * (a[i] - prev);
    }
    prev = a[i];
  }
  cout << ans;
}
