#include <bits/stdc++.h>
using namespace std;
int a[100];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  long long p = 1000;
  for (int i = 1; i < n; i++) {
    if (a[i] < a[i + 1]) p = (p / a[i]) * a[i + 1] + p % a[i];
  }
  printf("%I64d\n", p);
}
