#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> arr(n + 1);
  for (int i = 1; i < n + 1; ++i) {
    cin >> arr[i];
  }
  int s = 0;
  long long cost = 1000;
  for (int i = 1; i < n; ++i) {
    if (s == 0) {
      if (arr[i] < arr[i + 1]) {
        s = cost / arr[i];
        cost -= s * arr[i];
      }
    } else {
      if (arr[i] > arr[i + 1]) {
        cost += s * arr[i];
        s = 0;
      }
    }
  }
  if (s != 0) {
    cost += s * arr[n];
  }
  cout << cost << "\n";
}
