#include <bits/stdc++.h>
using ll = long long;
using namespace std;
using P = pair<int, int>;
int main() {
  int m = 1000;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n - 1; i++) {
    ll s = 0;
    if (a[i] < a[i + 1]) s = m / a[i];
    m += (a[i + 1] - a[i]) * s;
  }
  cout << m << endl;
  return 0;
}
