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