#include <bits/stdc++.h>
using namespace std;
char e = '\n';
long long i, j, le;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    long long n, mx, bot, got;
    cin >> n;
    vector<long long> a(n);
    for (long long i = 0; i < n; i++) cin >> a[i];
    mx = *max_element(a.begin(), a.end());
    if (mx <= a[0])
      cout << "1000" << e;
    else {
      i = 0;
      got = 1000;
      while (i < n - 1) {
        if (a[i + 1] < a[i]) {
          got = bot * a[i - 1];
          bot = 0;
        } else if (a[i + 1] > a[i]) {
          bot = got / a[i];
          got = got % a[i];
        }
        i++;
      }
      if (bot > 0) got += bot * a[n - 1];
      cout << got << e;
    }
  }
  return 0;
}
