#include <bits/stdc++.h>
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;
}
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Pl = pair<long long, long long>;
using veci = vector<int>;
using vecl = vector<long long>;
using vecveci = vector<vector<int>>;
using vecvecl = vector<vector<long long>>;
int main() {
  int N;
  cin >> N;
  veci A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  int kabu = 0;
  int cur = 1000;
  for (int i = 0; i < (N - 1); ++i) {
    if (A[i] < A[i + 1]) {
      kabu += cur / A[i];
      cur %= A[i];
      cur += A[i + 1] * kabu;
      kabu = 0;
    }
  }
  cout << cur << endl;
}
