#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void d_err() { cerr << endl; }
template <typename H, typename... T>
void d_err(H h, T... t) {
  cerr << h << " ";
  d_err(t...);
}
template <typename T>
void print(T x) {
  cout << x << endl;
}
long long INF = 1e16;
int inf = 1e9;
long long MOD = 1e9 + 7;
void greedy(int N, const vector<long long>& A) {
  long long cur = 1000;
  for (int i = (0); i < (N - 1); ++i) {
    long long stock = 0;
    if (A[i] < A[i + 1]) stock = cur / A[i];
    cur += (A[i + 1] - A[i]) * stock;
  }
  print(cur);
}
void chmax(long long& a, long long b) {
  if (a < b) a = b;
}
void dp(int N, const vector<long long>& A) {
  vector<long long> dp(N + 1, 0);
  dp[0] = 1000;
  for (int i = (0); i < (N); ++i) {
    for (int j = (0); j < (i); ++j) {
      chmax(dp[i + 1], dp[j] % A[j] + dp[j] / A[j] * A[i]);
    }
  }
  print(dp[N]);
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = (0); i < (N); ++i) cin >> A[i];
  dp(N, A);
}
