#include <bits/stdc++.h>
using namespace std;
int a[100], b[100];
int main() {
  int n;
  cin >> n;
  int k = 1, s = 1000;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > a[i - 1]) {
      b[i - 1] = 1;
    } else if (a[i] == a[i - 1]) {
      b[i - 1] = 0;
    } else
      b[i - 1] = -1;
  }
  int h = 0;
  for (int i = 1; i < n; i++) {
    if (b[i] == 1) {
      h = s / a[i];
      s = s % a[i];
    } else if (b[i] == -1) {
      s = s + a[i] * h;
    } else
      continue;
  }
  if (a[n] > a[n - 1]) {
    s = s + a[n] * h;
  }
  cout << s << endl;
  return 0;
}
