#include <bits/stdc++.h>
using namespace std;
void fst() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
int mod = 1e9 + 7;
int binpow(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
      res %= mod;
    }
    a = a * a;
    a %= mod;
    b >>= 1;
    b %= mod;
  }
  return res;
}
long long n, k, tc, y, u, v;
int32_t main() {
  fst();
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long prev = a[0];
  long long i = 1;
  long long money = 1000;
  while (i < n) {
    if (a[i] <= prev) {
      prev = a[i];
    } else {
      long long k = (money) / prev;
      money %= prev;
      money += k * a[i];
      if (i == n - 1) break;
      prev = a[i + 1];
    }
    i++;
  }
  cout << money << "\n";
}
