#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-10;
const long long INF = 1e18;
const long double PI = acos(-1.0L);
int main() {
  int m = 1000;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  for (int i = 1; i < n; i++) {
    if (a[i - 1] == a[i]) continue;
    if (a[i - 1] < a[i]) {
      int s = m / a[i - 1];
      m += (a[i] - a[i - 1]) * s;
    }
  }
  cout << m << endl;
  return 0;
}
