#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int b = 0, s = 0;
  long long curr = 1000;
  for (int i = 0; i < n; i++) {
    while (a[i + 1] <= a[i] && i < n) i++;
    b = i;
    while (a[i + 1] >= a[i] && i < n) i++;
    if (i == n) i--;
    s = i;
    if (b < s) {
      int num = (curr / a[b]);
      long long e = curr - num * a[b];
      curr = e + num * a[s];
    }
  }
  cout << curr << endl;
  return 0;
}
