#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> trend(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i + 1) - a.at(i) > 0)
      trend.at(i) = 1;
    else if (a.at(i + 1) - a.at(i) < 0)
      trend.at(i) = -1;
    else
      trend.at(i) = 0;
  }
  long long sum = 1000;
  int stock_num = 0;
  for (int i = 0; i < n; i++) {
    if (i == n - 1) {
      sum += stock_num * a.at(n - 1);
      break;
    }
    if (trend.at(i) == 0)
      continue;
    else if (trend.at(i) > 0) {
      stock_num += sum / a.at(i);
      sum = sum % a.at(i);
    } else {
      sum += stock_num * a.at(i);
      stock_num = 0;
    }
  }
  cout << sum;
  return 0;
}
