#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long inf = 1e18;
int n;
vector<int> a(100000);
int rec(int cur, int pos, int cost, int stocks) {
  if (pos >= n) return INT_MIN;
  if (stocks < 0) return INT_MIN;
  int i = pos;
  if (pos == n - 1) {
    return stocks + cur * a[i];
  }
  int t0 = rec(cur, pos + 1, cost, stocks);
  int t1 = rec(cur + (stocks / a[i]), pos + 1, cost, stocks % a[i]);
  int t2 = rec(0, pos + 1, cur * a[i], stocks + cur * a[i]);
  int new_stocks = stocks + cur * a[i];
  int t3 = rec(new_stocks / a[pos], pos + 1, cost, new_stocks % a[i]);
  return max(max(t0, t1), max(t2, t3));
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  long long ans = 1000;
  int max_so_far = 0;
  for (int i = 1; i < n; ++i) {
    if (a[i] >= a[i - 1]) {
      int tmp = ans / a[i - 1];
      ans %= a[i - 1];
      ans += (long long)tmp * a[i];
    }
  }
  cout << ans;
  return 0;
}
