#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100;
const long long MOD = 10;
long long _gcd(long long a, long long b) {
  if (b == 0) return a;
  return _gcd(b, a % b);
}
long long gcd(long long a, long long b) {
  a = abs(a), b = abs(b);
  if (a < b) swap(a, b);
  return _gcd(a, b);
}
long long qpow(long long a, long long n) {
  long long rt = 1;
  while (n) {
    if (n & 1) rt = (rt * a) % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return rt;
}
long long factor[MAXN];
void cal_factor() {
  factor[0] = 1;
  for (int u = 1; u < MAXN; u++) {
    factor[u] = (factor[u - 1] * u) % MOD;
  }
}
long long C(long long n, long long k) {
  return factor[n] * qpow(factor[n - k], MOD - 2) % MOD *
         qpow(factor[k], MOD - 2) % MOD;
}
int A[MAXN];
void solve() {
  int N;
  cin >> N;
  for (int u = 0; u < N; u++) cin >> A[u];
  int money = 1000;
  int hd = 0;
  while (hd < N) {
    while (hd + 1 < N && A[hd + 1] < A[hd]) {
      hd++;
    }
    int tl = hd;
    while (tl + 1 < N && A[tl + 1] > A[tl]) {
      tl++;
    }
    money = money / A[hd] * A[tl] + money % A[hd];
    hd = tl + 1;
  }
  cout << money << "\n";
}
int main() { solve(); }
