#include <bits/stdc++.h>
using namespace std;
long long int a[88];
int n;
void solveup() {
  long long int have = 0, money = 1000;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      long long int x = money / a[i];
      money -= x * a[i];
      have += x;
      continue;
    }
    long long int x = a[i] * have;
    have = 0;
    money += x;
  }
  money = max(money, 1000ll);
  cout << money << '\n';
}
void solvedown() {
  long long int have = 0, money = 1000;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 0) {
      long long int x = money / a[i];
      money -= x * a[i];
      have += x;
      continue;
    }
    long long int x = a[i] * have;
    have = 0;
    money += x;
  }
  money = max(money, 1000ll);
  cout << money << '\n';
}
int main() {
  cin >> n;
  srand(time(0));
  for (int i = 1; i <= n; i++) {
    a[i] = 100;
    if (i % 2 == 0) a[i] = 200;
    cin >> a[i];
  }
  vector<int> v;
  v.push_back(a[1]);
  for (int i = 2; i <= n; i++) {
    if (a[i] == a[i - 1]) continue;
    v.push_back(a[i]);
  }
  for (int i = 0; i < v.size(); i++) a[i + 1] = v[i];
  n = v.size();
  if (n == 1) {
    cout << 1000 << '\n';
    return 0;
  }
  v.clear();
  v.push_back(a[1]);
  for (int i = 2; i < n; i++) {
    if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
      v.push_back(a[i]);
      continue;
    }
    if (a[i - 1] > a[i] && a[i] < a[i + 1]) {
      v.push_back(a[i]);
      continue;
    }
  }
  v.push_back(a[n]);
  for (int i = 0; i < v.size(); i++) a[i + 1] = v[i];
  n = v.size();
  if (a[2] > a[1])
    solveup();
  else
    solvedown();
}
