#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  int money = 1000, stock = 0;
  bool status = false;
  for (int i = 0; i < n; i++) cin >> a[i];
  int i = 0, j;
  while (i < n) {
    j = i;
    if (status == false) {
      while (j < n - 1 & a[j] >= a[j + 1]) j++;
      if (j == n - 1) break;
      stock = money / a[j];
      money = money % a[j];
      status = true;
    } else if (status == true) {
      while (j < n - 1 && a[j] <= a[j + 1]) j++;
      money = money + a[j] * stock;
      status = false;
    }
    i = j + 1;
  }
  cout << money << endl;
}
