#include <bits/stdc++.h>
using namespace std;
string imp = "Impossible\n";
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
clock_t startTime;
double getCurrentTime() {
  return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}
const int N = 2e4 + 5;
long long MOD = 1e9 + 7;
long long m, k, i, j;
bool f0, f1, f2;
const int MAXN = 2e3;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(11);
  int tests = 1;
  while (tests--) {
    long long n;
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long c = 1000, cnt = 0;
    for (int i = 0; i < n;) {
      int j = i + 1;
      if (a[j] <= a[i]) {
        while (j < n && a[j] <= a[i]) {
          j++;
        }
        if (j != n) {
          cnt = c / a[j - 1];
          c -= cnt * a[j - 1];
          c += cnt * a[j];
        }
      } else {
        cnt = c / a[i];
        c -= cnt * a[i];
        c += cnt * a[j];
      }
      i = j;
    }
    cout << c << "\n";
  }
  return 0;
}
