#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int i = 0;
  int sum = 1000;
  while (i < n - 1) {
    while (i < n - 1 && a[i + 1] <= a[i]) {
      i++;
    }
    if (i == n - 1) {
      break;
    }
    int buy = i;
    i++;
    while (i < n && a[i] >= a[i - 1]) {
      i++;
    }
    int sell = i - 1;
    int temp = sum / a[buy];
    sum -= temp * a[buy];
    sum += temp * a[sell];
  }
  cout << sum;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
