#include <bits/stdc++.h>
long long mygcd(long long a, long long b) {
  if (b == 0) return a;
  return mygcd(b, a % b);
}
long long mylcm(long long a, long long b) { return a / mygcd(a, b) * b; }
long long mymax(long long a, long long b) { return (a > b) ? a : b; }
long long mymin(long long a, long long b) { return (a < b) ? a : b; }
int myasc(const void* a, const void* b) {
  return *(long long*)a - *(long long*)b;
}
int mydsc(const void* a, const void* b) {
  return *(long long*)b - *(long long*)a;
}
long long mypow(long long a, long long b) {
  long long x;
  if (b == 0)
    return 1;
  else if (b % 2 == 1)
    return a * mypow(a, b - 1) % 10000007;
  x = mypow(a, b / 2);
  return x * x % 10000007;
}
long long fac[100001], inv[100001];
long long mycomb(long long a, long long b) {
  if (a < b || a < 0 || b < 0) return 0;
  return fac[a] * inv[a - b] * inv[b] % 10000007;
}
int main() {
  long long n, a[81], dp[81] = {};
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) scanf("%lld", &a[i]);
  dp[1] = 1000;
  for (int i = 1; i < n; i++) {
    dp[i + 1] = dp[i];
    for (int j = 0; j < i; i++) {
      long long sta = dp[j] / a[j];
      long long now = dp[j] + (a[i] - a[j]) * sta;
      dp[i] = mymax(dp[i], now);
    }
    printf("%lld", dp[n]);
    return 0;
  }
  return 0;
}
