#include <bits/stdc++.h>
using namespace std;
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;
}
const long long INF = 1LL << 60;
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = (0); i < (N); i++) cin >> A[i];
  long long money = 1000;
  long long kabu = 0;
  for (long long i = (0); i < (N - 1); i++) {
    int indexh = -1, indexl = -1;
    for (long long j = (i + 1); j < (N); j++) {
      if (A[i] < A[j]) {
        indexh = j;
        break;
      } else if (A[i] > A[j]) {
        indexl = j;
      }
    }
    if (indexl == -1) {
      long long cnt = money / A[i];
      money -= cnt * A[i];
      money += cnt * A[indexh];
      i = indexh;
    }
  }
  cout << money << endl;
  return 0;
}
