#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];
  }
  long long money[N];
  for (int n = 0; n < N; n++) {
    money[n] = -10000000;
  }
  money[0] = 1000;
  for (int n = 1; n < N; n++) {
    money[n] = money[n - 1];
    for (int i = 0; i < n; i++) {
      int stock = money[i] / a[i];
      long long im = money[i] + (a[n] - a[i]) * stock;
      money[n] = max(money[n], im);
    }
  }
  cout << money[N - 1] << endl;
}
