#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1000000000;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int stocks, money;
  stocks = 0;
  money = 1000;
  int ans = 1000;
  bool bd = false;
  for (int i = 0; i < N; i++) {
    bd = false;
    if (i + 1 < N and A[i + 1] > A[i]) {
      stocks += money / A[i];
      money -= money / A[i] * A[i];
      money += A[i + 1] * stocks;
      stocks = 0;
    }
  }
  money += stocks * A[N - 1];
  cout << money << endl;
}
