#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long res = 1;
  a = a % 1000000007;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % 1000000007;
      b--;
    }
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return res;
}
long long fermat_inv(long long y) { return power(y, 1000000007 - 2); }
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int ans = 0;
    int val = a[0];
    int curr = 1000;
    for (int i = 0; i + 1 < n; i++) {
      int j = i;
      while (j + 1 < n && a[j + 1] >= a[j]) {
        j++;
      }
      val = max(0, a[j] - a[i]) * (curr / a[i]);
      curr += val;
      i = j;
    }
    cout << curr << "\n";
  }
  return 0;
}
