#include <bits/stdc++.h>
using namespace std;
const int NMAX = 85;
int n, a[NMAX], sum = 1000, stocks, x, y, nr;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int i = 1;
  while (i < n) {
    while (i < n && a[i] >= a[i + 1]) {
      i++;
    }
    x = a[i];
    while (i < n && a[i] <= a[i + 1]) {
      i++;
    }
    y = a[i];
    nr = sum / x;
    stocks += nr;
    sum -= nr * x;
    sum += stocks * y;
    stocks = 0;
  }
  cout << sum;
  return 0;
}
