#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  long long money = 1000;
  vector<bool> isUp(N, false);
  for (int i = 0; i < N - 1; i++) {
    if (A[i + 1] >= A[i]) {
      isUp[i] = true;
    }
  }
  for (int i = 0; i < N - 1; i++) {
    if (isUp[i]) {
      int laterMax = *max_element(A.begin() + i, A.end());
      if (laterMax <= A[i]) {
        continue;
      } else {
        for (int j = i + 1; j < N; j++) {
          if (!isUp[j]) {
            long long cnt = money / A[i];
            money -= A[i] * cnt;
            money += A[j] * cnt;
            i = j + 1;
            break;
          }
        }
      }
    }
  }
  cout << money << endl;
  return 0;
}
