#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  unsigned long long int A[N], sum = 1000, a, b, c = 0;
  int i, j, k, q;
  for (i = 0; i < N; i++) {
    cin >> A[i];
  }
  a = A[0];
  for (i = 0; i < N;) {
    q = i;
    for (j = i + 1; j < N; j++) {
      if (A[j] > A[i]) break;
    }
    b = A[i];
    for (k = i + 1; k < j; k++) {
      if (A[k] < b) {
        q = k;
        b = A[i];
      }
    }
    if (j == N) {
      sum += c * A[i];
      break;
    } else {
      sum = sum + A[i] * c;
      c = (unsigned long long int)(sum / A[q]);
      sum = sum - c * A[q];
      i = j;
    }
  }
  cout << sum << "\n";
  return 0;
}
