#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, amt = 1000;
  cin >> n;
  vector<int> vc(n + 1);
  for (int i = 1; i <= n; i++) cin >> vc[i];
  int shares = 0;
  for (int i = 1; i < n; i++) {
    if (vc[i + 1] < vc[i]) {
      amt += shares * vc[i];
      shares = 0;
    }
    if (vc[i + 1] > vc[i]) {
      shares = amt / vc[i];
      amt = amt % vc[i];
    }
  }
  amt += shares * vc[n];
}
