#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1e16;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long money = 1000;
  long long kabu = 0;
  for (long long i = 0; i < n; i++) {
    if (kabu == 0) {
      bool ok = false;
      for (long long j = i + 1; j <= n - 1; j++) {
        if (a[i] < a[j]) {
          ok = true;
        }
      }
      if (ok) {
        kabu = money / a[i];
        money -= a[i] * kabu;
      }
    } else {
      bool ok = false;
      if (i < n - 1 && a[i] > a[i + 1]) {
        ok = true;
      }
      if (i == n - 1) {
        ok = true;
      }
      if (ok) {
        money += a[i] * kabu;
        kabu = 0;
      }
    }
  }
  cout << money << endl;
  return 0;
}
