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