#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), x(n, -1);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  a.push_back(-1);
  for (int i = 0; i < (n); ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (a[i] < a[j] && a[j] > a[j + 1]) {
        x[i] = j;
        i = j;
        break;
      }
    }
  }
  long long int money = 1000;
  for (int i = 0; i < (n); ++i) {
    if (x[i] == -1) continue;
    long long int kabu = money / a[i];
    money -= kabu * a[i];
    money += kabu * a[x[i]];
  }
  cout << money << endl;
  return 0;
}
