#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
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 / gcd(a, b) * b; }
bool isPrime(long long x) {
  long long i;
  if (x < 2)
    return 0;
  else if (x == 2)
    return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
int digsum(long long n) {
  int res = 0;
  while (n > 0) {
    res += n % 10;
    n /= 10;
  }
  return res;
}
int dignum(long long n) {
  int res = 0;
  while (n > 0) {
    res++;
    n /= 10;
  }
  return res;
}
long long stringcount(string s, char c) {
  return count(s.cbegin(), s.cend(), c);
}
long long ka(long long i) {
  long long res = 1;
  while (i > 0) {
    res = res * i;
    i--;
  }
  return res;
}
long long ncr(long long x, long long y) {
  long long a = x;
  long long b = 1;
  if (y > (x / 2)) {
    y = x - y;
  }
  for (long long i = 1; i < y; i++) {
    a *= x - i;
    b *= i + 1;
  }
  return a / b;
}
long long f(long long x) {
  long long dp[x + 1];
  dp[1] = 1;
  dp[2] = 1;
  for (long long i = 3; i <= x; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
  }
  return dp[x];
}
int ctoi(char c) { return c - '0'; }
vector<pair<long long, long long> > prime_factorize(long long N) {
  vector<pair<long long, long long> > res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (long long(i) = 0; (i) < (n); (i)++) cin >> a[i];
  long long money = 1000;
  int kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      int b = money / a[i];
      money = money - b * a[i];
      kabu += b;
    } else if (a[i] != a[i + 1]) {
      money += kabu * a[i];
      kabu = 0;
    }
  }
  money += kabu * a[n - 1];
  cout << money << endl;
}
