#include <bits/stdc++.h>
using namespace std;
const long long dx[4] = {-1, 1, 0, 0};
const long long dy[4] = {0, 0, -1, 1};
long long a[81];
signed main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long ptr = n - 1;
  while (a[ptr - 1] >= a[ptr]) ptr--;
  long long gol = 1000, sto = 0;
  if (!ptr) {
    cout << "1000";
    return 0;
  }
  for (long long i = 0; i <= ptr; i++) {
    if (!i || a[i] < a[i - 1]) {
      sto = gol / a[i];
      gol = gol % a[i];
    } else if (a[i] > a[i - 1]) {
      gol += sto * a[i];
      sto = 0;
    }
  }
  cout << gol;
  return 0;
}
