#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  ll m = 1000;
  vector<int> a(n);
  for (auto &i : a) cin >> i;
  for (int i = 0; i < n; i++) {
    bool flg = 0;
    int b{i}, c{i};
    for (int j = i; j < n; j++) {
      if (a.at(i) < a.at(j)) {
        b = j;
        break;
      } else if (j == n - 1) {
        flg = 1;
        break;
      }
    }
    if (flg) break;
    for (int j = i; j < b - 1; j++) {
      if (a.at(i) > a.at(j)) {
        c = j;
      }
    }
    m = m % a.at(c) + m / a.at(c) * a.at(b);
    i = b - 1;
  }
  cout << m << endl;
}
