#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long b[n];
  bool flag = 0;
  for (long long i = 1; i <= n - 1; i++) {
    b[i] = a[i] - a[i - 1];
    if (b[i] > 0) flag = 1;
  }
  if (flag == 0) {
    cout << 1000;
    return;
  }
  long long ans = 1000;
  long long stk;
  long long r;
  flag = 0;
  for (long long i = 1; i <= n - 1; i++) {
    if (b[i] > 0) {
      flag = 1;
      stk = ans / a[i - 1];
      r = a[i - 1];
      ans = ans % a[i - 1];
      if (i == n - 1) {
        ans += (b[i] * stk + a[i - 1] * stk);
      }
    }
    if (b[i] < 0 && flag == 1) {
      long long temp = a[i - 1] - r;
      ans += (temp * stk + r * stk);
    }
  }
  cout << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
