#include <bits/stdc++.h>
const unsigned long long int mod = 1e9 + 7;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  int ma = 0, mi = 1000000;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    ma = max(ma, a[i]);
    mi = min(mi, a[i]);
  }
  if (ma == a[0]) {
    cout << 1000 << "\n";
    return 0;
  }
  int mo = 1000, kab = 0, san = 0;
  for (int i = 0; i < n; ++i) {
    if (i != n - 1)
      if (a[i] < a[i + 1]) {
        kab += mo / a[i];
        mo -= (mo / a[i] * a[i]);
        san = a[i];
      }
    if (i != 0)
      if (a[i] > a[i - 1]) {
        mo += kab * a[i];
        kab = 0;
      }
  }
  cout << mo << "\n";
}
