#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
long long int powD(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % (long long int)(1e9 + 7);
    x = (x * x) % (long long int)(1e9 + 7);
    y = y >> 1;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int bal = 1000;
  int maxm = -1;
  int minm = 1e7;
  int stocks = 0;
  for (int i = 0; i < n; ++i) {
    if (i == n - 1) {
      bal += stocks * a[i];
      stocks = 0;
      continue;
    }
    if (a[i] > a[i + 1]) {
      bal += stocks * a[i];
      stocks = 0;
    }
    if (a[i] < a[i + 1]) {
      int q = bal / a[i];
      stocks += q;
      bal = bal % a[i];
    }
  }
  cout << bal << "\n";
}
