#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int A[n], i;
  int B[n];
  for (i = 0; i < n; ++i) {
    cin >> A[i];
    B[i] = A[i];
  }
  int f = 0;
  for (i = 0; i < n; ++i) {
    if (A[i] > A[i + 1]) {
      f = 1;
      break;
    }
  }
  int tot = 1000;
  if (f == 0) {
    cout << tot << endl;
  } else {
    sort(B, B + n);
    map<int, int> P;
    for (i = 0; i < n; ++i) {
      P[B[i]] = i + 1;
    }
    int n = 0, mn = INT_MAX;
    for (i = 0; i < n - 1; ++i) {
      if (P[A[i]] != n) {
        mn = min(A[i], mn);
      } else {
        tot = ((tot % mn) + (tot / mn) * A[i]);
        break;
      }
    }
    cout << tot << endl;
  }
}
