#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[100000] = {0}, t = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int small;
  small = arr[0];
  for (int i = 0; i < n; i++) {
    int q = 0;
    if (arr[i] > small) {
      q = t / small;
      t -= q * small;
      t += q * arr[i];
      small = arr[i];
    } else if (arr[i] < small) {
      small = arr[i];
    }
  }
  cout << t << endl;
  return 0;
}
