#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sum;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long tk = 1000, stock = 0;
  int cnt = a[0];
  for (int i = 1; i < n; i++) {
    if (cnt < a[i]) {
      int temp = tk / cnt;
      tk = tk - cnt * temp;
      tk += a[i] * temp;
      cnt = a[i];
    } else
      cnt = a[i];
  }
  cout << tk << endl;
  return 0;
}
