#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long _, i, j, n, a, b, e, k, u, t, x = 1, m, y, q, f = 1, c = 0, d = 0,
                                          l, p, z, o, r, g;
  string ss, s;
  cin >> n;
  long long aa[n];
  for (i = 0; i < (n); i++) {
    cin >> aa[i];
  }
  x = 1000;
  for (i = 0; i < (n - 1); i++) {
    if (aa[i] < aa[i + 1]) {
      if (aa[i] <= x) {
        c = x / aa[i];
        x %= aa[i];
        x += c * aa[i + 1];
        c = 0;
        i++;
      }
    }
  }
  if (c > 0) {
    x += c * aa[n - 1];
  }
  cout << x << endl;
}
