#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];
  }
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      int r = sum % a[i - 1];
      sum = (sum / a[i - 1]) * a[i] + r;
    }
  }
  cout << sum;
  return 0;
}
