#include <bits/stdc++.h>
using namespace std;
int main() {
  long long money = 1000;
  int n;
  cin >> n;
  vector<int> a(n), bs(n, 0);
  for (int i = 0; i < n; i++) cin >> a[i];
  int k = 0;
  for (int i = n - 2; i > 0; i--) {
    if (a[i - 1] <= a[i] && a[i] > a[i + 1]) bs[i] = 1;
    if (a[i - 1] >= a[i] && a[i] < a[i + 1]) bs[i] = -1;
  }
  if (a[0] < a[1]) bs[0] = -1;
  if (a[n - 2] < a[n - 1]) bs[n - 1] = 1;
  for (int i = 0; i < n; i++) {
    if (bs[i] == -1 && money > a[i]) {
      k = money / a[i];
      money -= k * a[i];
    }
    if (bs[i] == 1) {
      money += k * a[i];
      k = 0;
    }
  }
  money += a[n - 1] * k;
  cout << money << endl;
  return 0;
}
