#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int left = 1000, stocks = 0;
  for (int i = 0; i < n - 1; i++) {
    int ans1 = left, ans2 = stocks;
    if (a[i + 1] > a[i]) {
      stocks = left / a[i];
      left -= stocks * a[i];
    } else if (a[i + 1] < a[i] && a[i - 1] < a[i] && i != 0) {
      left += stocks * a[i];
      stocks = 0;
    }
    if (left == 0 && stocks == 0) left = ans1, stocks = ans2;
  }
  left += stocks * a[n - 1];
  cout << left << "\n";
}
int main() {
  int t;
  t = 1;
  while (t--) solve();
  return 0;
}
