#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long mi = a[0], ma = 0, sum = 1000;
  for (long long i = 1; i < n; i++) {
    while (i < n && a[i] <= mi) {
      mi = a[i];
      i++;
    }
    ma = a[i];
    i++;
    while (i < n && a[i] > ma) {
      ma = a[i];
      i++;
    }
    sum = (sum / mi) * ma + sum % mi;
    mi = INT_MAX;
    ma = INT_MIN;
  }
  long long aa = 1000;
  cout << max(aa, sum);
}
