#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 money = 1000;
  for (int i = 0; i < N - 1; i++) {
    long long stocks = 0;
    if (A[i + 1] > A[i]) {
      stocks = money / A[i];
    }
    money += stocks * (A[i + 1] - A[i]);
  }
  cout << money << endl;
}
