#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e18;
const long long INF = 1e9;
int ci;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  vector<int> yen(n + 1), kabu(n + 1);
  a[0] = 500;
  yen[0] = 1000;
  kabu[0] = 0;
  for (int i = 1; i < n + 1; ++i) cin >> a[i];
  int i = 0;
  while (i < n + 1) {
    if ((a[i] > a[i + 1]) & ((int)(yen[i] / a[i + 1]) > 0)) {
      while ((a[i] > a[i + 1]) & (i < n)) {
        yen[i + 1] = yen[i];
        kabu[i + 1] = kabu[i];
        ++i;
      }
      kabu[i] = yen[i] / a[i];
      yen[i] = yen[i - 1] - kabu[i] * a[i];
    }
    if ((a[i] < a[i + 1]) & (kabu[i] > 0)) {
      while ((a[i] < a[i + 1]) & (i < n)) {
        yen[i + 1] = yen[i];
        kabu[i + 1] = kabu[i];
        ++i;
      }
      yen[i] = yen[i - 1] + a[i] * kabu[i - 1];
      kabu[i] = 0;
    } else {
      yen[i + 1] = yen[i];
      kabu[i + 1] = kabu[i];
      ++i;
    }
  }
  int res = yen[n] + a[n] * kabu[n];
  cout << res << "\n";
  cin >> ci;
}
