#include <bits/stdc++.h>
using namespace std;
int n;
int a[100];
int uridoki(int cur) {
  int i = cur + 1;
  for (; i < n - 1; i++) {
    if (a[i] > a[i + 1]) break;
  }
  return i;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000;
  int i = 0;
  while (i < n - 1) {
    if (a[i] < a[i + 1]) {
      int j = uridoki(i);
      money = (money / a[i]) * a[j] + money % a[i];
    }
    i++;
  }
  cout << money << endl;
  return 0;
}
