#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int MAX = 200005;
const int INF = 1001001001;
const int MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto &i : A) cin >> i;
  long long ans = 1000;
  for (int i = 0; i < (N - 1); ++i) {
    if (A[i] >= A[i + 1]) continue;
    int j = i;
    while (j + 1 < N && A[j] < A[j + 1]) j++;
    long long k = ans / A[i];
    ans = ans % A[i] + k * A[j];
  }
  cout << ans << endl;
}
