#include <bits/stdc++.h>
int main() {
  short int n;
  scanf("%hi", &n);
  long long sum = 1000, A[80], stocks = 0;
  for (short int i = 0; i < n; i++) {
    scanf("%lli", A + i);
  }
  for (short int i = 0; i < n; i++) {
    if (i < n - 1 && A[i] < A[i + 1]) {
      stocks = sum / A[i];
      sum -= stocks * A[i];
    }
    if (i == n - 1 || A[i] > A[i + 1]) {
      sum += stocks * A[i];
      stocks = 0;
    }
  }
  printf("%lli", sum);
}
