#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const int MAX = 510000;
const long long MOD = 1000000007;
long long roundd(long long x, long long n) {
  if (x > n) {
    return x % n;
  } else if (x < 0) {
    return x % n + n;
  } else
    return x;
}
bool isprime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long modpow(long long x, long long n) {
  long long r = 1;
  while (n) {
    if (n & 1) r = r * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return r;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n), b(0);
  long long now = 1000, kabu;
  for (long long i = (0); i < (n); ++i) {
    cin >> a[i];
  }
  b.push_back(a[0]);
  for (long long i = (0); i < (n - 1); ++i) {
    if (a[i] != a[i + 1]) {
      b.push_back(a[i + 1]);
    }
  }
  for (long long i = (0); i < (b.size()); ++i) {
    long long kai = b[i], uri = -1;
    for (long long j = (i + 1); j < (b.size()); ++j) {
      if (b[j] > b[i]) {
        uri = b[j];
        i = j;
        break;
      }
    }
    if (uri != -1) {
      now = ((now / kai) * uri) + (now % kai);
    }
  }
  cout << now << endl;
}
