#include <bits/stdc++.h>
using namespace std;
long long pow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a;
    a = a * a;
    n >>= 1;
  }
  return res;
}
long long pow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
const int MAX = 199;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long PER(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[n - k] % MOD) % MOD;
}
int main() {
  long long n;
  cin >> n;
  long long a[n + 1];
  for (long long i = 1; i <= (long long)(n); i++) cin >> a[i];
  long long money = 1000;
  long long num = 0;
  if (a[1] < a[2]) {
    num = floor(money / a[1]);
    money = money - num * a[1];
  }
  for (int i = 2; i <= n - 1; i++) {
    if (a[i - 1] <= a[i] && a[i] > a[i + 1]) {
      money += a[i] * num;
      num = 0;
    } else if (a[i - 1] >= a[i] && a[i] < a[i + 1]) {
      num = floor(money / a[i]);
      money = money - num * a[i];
    }
  }
  if (num > 0) {
    money = money + num * a[n];
  }
  cout << money << endl;
  return 0;
}
