#include <bits/stdc++.h>
using namespace std;
const char NL = '\n';
const char SP = ' ';
void buy(int &st, int &mo, int price) {
  int number = mo / price;
  st += number;
  mo = mo - price * number;
}
void sell(int &st, int &mo, int price) {
  mo += price * st;
  st = 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, mo = 1000, st = 0;
  cin >> n;
  int a[n];
  bool growing = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1] && !growing) {
      buy(st, mo, a[i - 1]);
      growing = true;
    } else if (a[i] < a[i - 1] && growing) {
      sell(st, mo, a[i - 1]);
      growing = false;
    }
    if (growing && i == n - 1) {
      sell(st, mo, a[i]);
    }
  }
  cout << mo << NL;
  return 0;
}
