#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
const int MAX = 1000000010;
const long long MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1]) {
      while (money - A[i] >= 0) {
        money -= A[i];
        kabu++;
      }
      money += A[i + 1] * kabu;
      kabu = 0;
    }
  }
  cout << money << endl;
  return 0;
}
