#include <bits/stdc++.h>
using namespace std;
long long a[200010];
vector<long long> v;
int main() {
  long long n, m, k;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long t = a[1], cnt = 0, f = 0;
  for (int i = 2; i <= n; i++) {
    if (cnt % 2 == 0) {
      if (a[i] > t) {
        if (f == 0) {
          v.push_back(t);
          f = 1;
        }
        v.push_back(a[i]), cnt++, t = a[i];
      }
    } else {
      if (a[i] < t) v.push_back(a[i]), cnt++, t = a[i];
    }
  }
  long long ans = 0, pp = 1000;
  for (int i = 0; i < v.size(); i++) {
    if (i % 2) {
      long long p = pp / v[i - 1];
      ans += pp % v[i - 1];
      pp = v[i] * p;
    }
  }
  ans += pp;
  cout << ans << endl;
}
