#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PL = pair<ll, ll>;
using P = pair<int, int>;
constexpr int INF = 1000000000;
constexpr long long HINF = 1000000000000000;
constexpr long long MOD = 1000000007;
constexpr double EPS = 1e-4;
constexpr double PI = 3.14159265358979;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  vector<int> dp(N, 0);
  dp[0] = 1000;
  for (int i = 1; i < N; ++i) {
    dp[i] = dp[i - 1];
    for (int j = 0; j < (int)(i); j++) {
      int c = dp[j] / A[j], m = dp[j] % A[j];
      dp[i] = max(dp[i], c * A[i] + m);
    }
  }
  cout << dp[N - 1] << '\n';
  return 0;
}
