#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, shojikin = 1000, shojikabu = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  vector<int> joge(n);
  int age = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1)) {
      joge.at(i) = 0;
      age++;
    }
    if (a.at(i) == a.at(i + 1)) {
      joge.at(i) = 1;
    }
    if (a.at(i) > a.at(i + 1)) {
      joge.at(i) = 2;
    }
  }
  if (age == 0) {
    cout << "1000" << endl;
  } else {
    int ji = 0, start = 0;
    while (ji < n - 1) {
      bool agefind = false;
      while (agefind == false) {
        if (joge.at(ji) == 0) {
          agefind = true;
        }
        ji++;
      }
      int saiyasune = a.at(ji);
      for (int i = start; i < ji; i++) {
        if (a.at(i) < saiyasune) {
          saiyasune = a.at(i);
        }
      }
      shojikabu = shojikin / saiyasune;
      shojikin -= shojikin / saiyasune * saiyasune;
      shojikin += shojikabu * a.at(ji);
      shojikabu = 0;
      start = ji + 2;
      ji++;
    }
    cout << shojikin << endl;
  }
}
