#include <bits/stdc++.h>
using namespace std;
int n, m;
long long a[1005];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  long long m = 1000;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) m = m % a[i - 1] + (m / a[i - 1]) * a[i];
  }
  printf("%lld", m);
  return 0;
}
