#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int i = 0;
  long long cash = 1000;
  for (int i = 0; i < n; i++) {
    int low = a[i];
    while (i + 1 < n && a[i + 1] > a[i]) i++;
    int stonks = cash / low;
    cash += stonks * (a[i] - low);
  }
  cout << cash << '\n';
  return 0;
}
