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