#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    long long int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    long long int cost = 1000;
    long long int s = 0;
    for (int i = 0; i < n - 1; i++) {
      if (arr[i] < arr[i + 1] && cost) {
        s = s + (cost / arr[i]);
        long long int i1 = cost / arr[i];
        cost = cost - (i1 * arr[i]);
      } else if (s) {
        cost = cost + (s * arr[i]);
        s = 0;
      }
    }
    if (s) {
      cost = cost + (s * arr[n - 1]);
    }
    cout << max((long long int)1000, cost) << endl;
  }
}
