#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  cin >> n;
  vector<int> v;
  cin >> temp;
  v.push_back(temp);
  int num = temp;
  for (int i = 1; i < n; ++i) {
    cin >> temp;
    if (num != temp) {
      num = temp;
      v.push_back(temp);
    }
  }
  n = v.size();
  if (v.size() == 1)
    cout << 1000;
  else {
    int amount = 1000, stocks = 0, flag = 0;
    for (int i = 0; i < n - 1; ++i) {
      if (v[i] < v[i + 1]) {
        stocks = amount / v[i];
        amount = amount % v[i] + stocks * v[i + 1];
        i++;
      }
    }
    cout << amount;
  }
  return 0;
}
