#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<long long, vector<long long>, greater<long long>> spqll;
typedef priority_queue<long long, vector<long long>, less<long long>> bpqll;
long long INF = 1e9;
long long NIL = -1;
long long MOD = 1000000007;
long long LINF = 1e18;
long double EPS = 1e-9;
long double PI = M_PI;
vector<long long> dx = {1, 0, -1, 0, 1, -1, -1, 1};
vector<long long> dy = {0, 1, 0, -1, 1, 1, -1, -1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void yes() { cout << "Yes" << endl; }
void no() { cout << "No" << endl; }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  long long ans = 1000;
  long long k = 0;
  for (long long i = 0; i < n; i++) {
    if (i <= n - 2 && a[i] < a[i + 1]) {
      k += ans / a[i];
      ans -= k * a[i];
    }
    if (i > 0 && a[i - 1] < a[i]) {
      ans += k * a[i];
      k = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
