#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
using vl = vector<long long>;
long long n;
long long Main() {
  cin >> n;
  vl a(n);
  long long money = 1000;
  for (long long i = 0, i_len = (n); i < i_len; ++i) {
    cin >> a[i];
  }
  long long saiyasu = a[0];
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (a[i] < a[j]) {
        money += money / saiyasu * (a[j] - saiyasu);
        i = j - 1;
        saiyasu = a[j];
        break;
      } else {
        saiyasu = min(saiyasu, a[j]);
      }
    }
  }
  cout << money << endl;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  Main();
  return 0;
}
