#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> a.at(i);
  }
  vector<int> b(N);
  for (int i = 0; i < (int)(N); i++) {
    b.at(i) = a.at(i);
  }
  sort(b.begin(), b.end());
  reverse(b.begin(), b.end());
  int key = 1;
  for (int i = 0; i < (int)(N); i++) {
    if (a.at(i) != b.at(i)) {
      key = 0;
    }
  }
  if (key == 1) {
    cout << 1000 << endl;
  } else {
    int money = 1000;
    int kabu = 0;
    int kabuka = 100;
    int i = 0;
    while (a.at(i) >= a.at(i + 1) && i + 1 < N) {
      i += 1;
    }
    if (i + 1 == N) {
      cout << 1000 << endl;
    } else {
      kabuka = a.at(i);
      kabu = money / kabuka + kabu;
      money = money - kabu * kabuka;
      for (int j = 0; j < (int)(N - i - 2); j++) {
        int k = i + j + 1;
        if (a.at(k - 1) <= a.at(k) && a.at(k) > a.at(k + 1)) {
          kabuka = a.at(k);
          money = money + kabuka * kabu;
          kabu = 0;
        }
        if (a.at(k - 1) >= a.at(k) && a.at(k) < a.at(k + 1)) {
          kabuka = a.at(k);
          kabu = money / kabuka + kabu;
          money = money - kabuka * kabu;
        }
      }
      if (a.at(N - 2) <= a.at(N - 1)) {
        kabuka = a.at(N - 1);
        money = money + kabu * kabuka;
        kabu = 0;
      }
      if (kabu > 0) {
        int h = 0;
        while (a.at(N - 1 - h) < a.at(N - 2 - h)) {
          h += 1;
        }
        kabuka = a.at(N - 2 - h);
        money = money + kabu * kabuka;
      }
      cout << money << endl;
    }
  }
}
