#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int balance = 1000;
  vector<int> min;
  vector<int> max;
  if (a[0] < a[1]) {
    min.push_back(0);
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i] <= a[i - 1] && a[i] < a[i + 1]) {
      min.push_back(i);
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i] >= a[i - 1] && a[i] > a[i + 1]) {
      max.push_back(i);
    }
  }
  if (a[n - 1] > a[n - 2]) {
    max.push_back(n - 1);
  }
  int d = 0;
  for (int i = 0; i < (int)min.size(); i++) {
    for (int j = 0; j < (int)max.size(); j++) {
      if (max[j] > min[i]) {
        int p = balance / a[min[i]];
        int q = p * (a[max[i]] - a[min[i]]);
        balance += q;
        j = (int)max.size();
      }
    }
  }
  cout << balance << endl;
}
