#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int aMax = -1, aMin = a[0];
  int ans = 1000;
  for (int i = 0; i < (n - 1); i++)
    if (a[i + 1] >= a[i])
      aMax = a[i + 1];
    else if (aMax > 0) {
      ans = (ans % aMin) + (ans / aMin) * aMax;
      aMin = a[i + 1];
      aMax = -1;
    } else {
      aMin = a[i + 1];
    }
  if (aMax > 0 && a[n - 2] < a[n - 1]) ans = (ans % aMin) + (ans / aMin) * aMax;
  cout << ans << endl;
  return 0;
}
