#include <bits/stdc++.h>
using namespace std;
int next_valley(int fr, int N, vector<int> A) {
  for (int i = fr + 1; i < N; i++) {
    if (A.at(i - 1) < A.at(i)) return i - 1;
  }
  return N - 1;
}
int next_peak(int fr, int N, vector<int> A) {
  for (int i = fr + 1; i < N; i++) {
    if (A.at(i - 1) > A.at(i)) return i - 1;
  }
  return N - 1;
}
int main() {
  int N, cur;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  cur = 1000;
  for (int i = 0; i < N; i++) {
    int valley, peak;
    i = next_valley(i, N, A);
    valley = A.at(i);
    i = next_peak(i, N, A);
    peak = A.at(i);
    cur = cur + (cur / valley) * (peak - valley);
  }
  cout << cur << endl;
}
