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