#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
const long long int MOD = 1e9 + 7;
struct edge {
  long long int to, cost;
};
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
long long int keta(long long int N) {
  int tmp{};
  while (N > 0) {
    tmp += (N % 10);
    N /= 10;
  }
  N = tmp;
  return N;
}
vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {
    IsPrime.resize(max + 1, true);
  }
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i * i <= max; ++i) {
    if (IsPrime[i]) {
      for (size_t j = 2; i * j <= max; ++j) {
        IsPrime[i * j] = false;
      }
    }
  }
}
long long int modpow(long long int a, long long int n) {
  long long int res = 1;
  while (n) {
    if (n & 1) {
      res = res * a % MOD;
    }
    a = a * a % MOD;
    n = n >> 1;
  }
  return res;
}
long long int MAXN = 2e5 + 10;
vector<long long int> inv(MAXN);
long long int nCk(long long int n, long long int k) {
  long long int res = 1;
  for (long long int i = 1; i <= k; i++) {
    res = res * (n - i + 1) % MOD;
  }
  for (long long int i = 1; i <= k; i++) {
    res = res * inv[i] % MOD;
  }
  return res;
}
bool kai(string S) {
  bool flag = true;
  for (long long int i = 0; i < S.size() / 2; ++i) {
    if (S[i] != S[S.size() - i - 1]) {
      flag = false;
      break;
    }
  }
  return flag;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long int ans = 1000;
  long long int m = 0;
  long long int now = a[0];
  for (long long int i = 0; i < n; ++i) {
    if (a[i] != now) continue;
    for (long long int j = i + 1; j < n; ++j) {
      if (now < a[j]) {
        m = ans / now;
        ans -= m * now;
        now = a[j];
        break;
      } else if (now > a[j]) {
        ans += m * now;
        m = 0;
        now = a[j];
        break;
      }
    }
  }
  ans += a[n - 1] * m;
  cout << ans << endl;
}
