#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  long long int st = 0;
  long long int mo = 1000;
  long long int min_v, max_v;
  for (int i = 0; i < (N); ++i) {
    min_v = A[i];
    max_v = A[i];
    for (int j = i + 1; j < (N); ++j) {
      if (min_v >= A[j]) {
        min_v = A[j];
      }
      if (((j + 1 < N && A[j + 1] < A[j]) || j + 1 == N) && A[j] > min_v) {
        max_v = A[j];
        st = mo / min_v;
        mo += ((max_v - min_v) * st);
        i = j + 1;
        break;
      }
    }
  }
  cout << mo << endl;
  return 0;
}
