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