#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> vecA(N + 1);
  for (int i = 0; i < N; i++) {
    cin >> vecA.at(i);
  }
  vecA.at(N) = 0;
  int stt = 1;
  int day = 0;
  int kabu = 0;
  int kane = 1000;
  while (day < N) {
    if (stt == 1) {
      if (vecA.at(day) < vecA.at(day + 1)) {
        int n = kane / vecA.at(day);
        kabu = kabu + n;
        kane = kane - vecA.at(day) * kabu;
        stt = 2;
        day++;
      } else {
        day++;
      }
    } else if (stt == 2) {
      if (vecA.at(day) > vecA.at(day + 1)) {
        kane = kane + vecA.at(day) * kabu;
        kabu = 0;
        stt = 1;
        day++;
      } else {
        day++;
      }
    }
  }
  cout << kane << endl;
}
