#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int n = 0; n < N; n++) {
    int t;
    cin >> t;
    A.at(n) = t;
  }
  int n;
  int last_val = A[0];
  int cur_val;
  int money = 1000;
  for (n = 1; n < N; n++) {
    cur_val = A[n];
    if (cur_val > last_val) {
      int units = money / last_val;
      money = money + (cur_val - last_val) * units;
    }
    last_val = A[n];
  }
  cout << money << endl;
  return 0;
}
