#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  long long stock = 0, money = 1000;
  vector<int> buy, sell;
  if (n == 2) {
    if (v[1] >= v[0]) buy.push_back(0);
  } else {
    if (v[1] >= v[0]) buy.push_back(0);
    for (int i = 1; i <= n - 2; i++) {
      if (v[i] <= v[i - 1] && v[i + 1] > v[i]) {
        buy.push_back(i);
      }
      if (v[i] >= v[i - 1] && v[i + 1] < v[i]) {
        sell.push_back(i);
      }
    }
  }
  if (v[n - 1] >= v[n - 2]) sell.push_back(n - 1);
  for (int i = 0; i < (n); i++) {
    if (find(buy.begin(), buy.end(), i) != buy.end()) {
      stock = money / v[i];
      money = money % v[i];
    }
    if (find(sell.begin(), sell.end(), i) != sell.end()) {
      money += stock * v[i];
      stock = 0;
    }
  }
  cout << money << endl;
}
