#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 stock = 0;
  long long int yen = 1000;
  int i = 0;
  while (i < n) {
    while (i + 1 < n && a[i] >= a[i + 1]) {
      i++;
    }
    {
      stock += yen / a[i];
      yen = yen % a[i];
    }
    while (i + 1 < n && a[i] <= a[i + 1]) {
      i++;
    }
    yen += stock * a[i];
    stock = 0;
    if (i == n - 1) break;
  }
  if (yen > 1000)
    cout << yen;
  else
    cout << "1000";
  return 0;
}
