#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) cin >> A[i];
  int money = 1000, kabu = 0;
  vector<pair<int, int>> pa(0);
  pair<int, int> p;
  bool first = false;
  for (int i = 0; i < n; i++) {
    if (!first) {
      p.first = A[i];
      first = true;
    } else {
      if (p.first < A[i]) {
        p.second = A[i];
        pa.push_back(p);
        p.first = 0;
        p.second = 0;
        first = false;
        continue;
      }
      if (A[i] < p.first) p.first = A[i];
    }
  }
  for (long unsigned int i = 0; i < pa.size(); i++) {
    if (pa[pa.size() - 1].second == 0 && i == pa.size() - 1) break;
    kabu = money / pa[i].first;
    money -= pa[i].first * kabu;
    money += pa[i].second * kabu;
    kabu = 0;
  }
  cout << money << endl;
}
