#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 1000;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int stock = 0, sale = 0;
  if (n == 1) {
    cout << 1000 << endl;
    cout << "here";
  } else {
    for (int i = 1; i < n; i++) {
      if (arr[i] < arr[i - 1] && stock == 0) {
        continue;
      } else if (arr[i] > arr[i - 1]) {
        stock += (ans / arr[i - 1]);
        ans -= stock * arr[i - 1];
        ans += stock * arr[i];
        stock = 0;
      }
    }
    cout << ans << endl;
  }
}
