#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500000 + 5;
int main() {
  int a[1111], N, i, share;
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> a[i];
  }
  i = share = 0;
  int m = 1000;
  while (1) {
    while (i + 1 < N && a[i] >= a[i + 1]) {
      i++;
    }
    if (i + 1 == N) {
      break;
    }
    share = m / a[i];
    m = m % a[i];
    while (i + 1 < N && a[i] <= a[i + 1]) {
      i++;
    }
    if (i + 1 == N) {
      m += share * a[N - 1];
      break;
    }
    m += share * a[i];
    share = 0;
  }
  cout << m;
  system("pause");
  return 0;
}
