#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF_LL = (long long)1000000007 * 1000000007;
const long long INF_INT = (long long)1000000007;
const double PI = 3.14159265358979323846;
const long long dx[4] = {1, 0, -1, 0};
const long long dy[4] = {0, 1, 0, -1};
struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  }
} iosetup;
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = (0); i < (N); ++i) {
    cin >> A[i];
  }
  long long cash = 1000;
  long long stock = 0;
  long long lastVal = 0;
  for (long long i = (0); i < (N - 1); ++i) {
    if (A[i] < A[i + 1]) {
      stock = cash / A[i];
      cash = cash % A[i];
      lastVal = A[i];
    } else if (A[i] > A[i + 1]) {
      cash += stock * A[i];
      stock = 0;
    }
  }
  cash += stock * max(lastVal, A[N - 1]);
  cout << cash << endl;
}
