#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n], s = 0, i, sum = 1000;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    if (i == n - 1) {
      sum += a[i] * s;
      break;
    }
    if (a[i] < a[i + 1] && i < n - 1) {
      s += sum / a[i];
      sum += sum % a[i];
      continue;
    }
    if (a[i] > a[i + 1] && i < n - 1) {
      sum += a[i] * s;
      s = 0;
    }
  }
  cout << sum << endl;
  return 0;
}
