#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int tk = 1000, x = 0;
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    for (int i = 1; i < n; i++) {
      if (arr[i] > arr[i - 1] && tk >= arr[i - 1]) {
        x = tk / arr[i - 1];
        tk -= (x * arr[i - 1]);
        tk += (x * arr[i]);
        i++;
      }
    }
    cout << tk << endl;
  }
  return 0;
}
