#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long cash = 1000;
  long long stock = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      stock += cash / a[i];
      cash -= stock * a[i];
    } else if (a[i] > a[i + 1]) {
      cash += stock * a[i];
      stock = 0;
    }
  }
  cout << cash << endl;
  return 0;
}
