#include <bits/stdc++.h>
using namespace std;
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int cel(int a, int b) { return ((a - 1) / b + 1); }
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return (a * b) / gcd(a, b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int ans = 1000, n, x = 0, f = 0, y;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n - 1; i++) {
    f = 0;
    for (int j = i + 1; j < n; j++) {
      if (v[j] <= v[i]) {
        f = 1;
        break;
      }
      if (v[j] > v[i]) {
        y = j;
        break;
      }
    }
    if (f) continue;
    ans = (ans / (v[i])) * (v[y]) + ans % ((v[i]));
    i = y - 1;
  }
  cout << ans << "\n";
  return 0;
}
