#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int arr[n], sum = 1000, st = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  bool buy = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (arr[i + 1] > arr[i]) {
      if (!buy) {
        buy = 1;
        st = sum / arr[i];
        sum %= arr[i];
      }
    } else if (arr[i + 1] < arr[i]) {
      if (buy) {
        buy = 0;
        sum += st * arr[i];
        st = 0;
      }
    }
  }
  sum += st * arr[n - 1];
  cout << sum << endl;
  return 0;
}
