#include <bits/stdc++.h>
int main(void) {
  int N;
  int A[80];
  long long money = 1000;
  long long trade = 0;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  for (int i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1]) {
      trade = money / A[i];
      money %= A[i];
    } else if (A[i] > A[i + 1]) {
      money += trade * A[i];
      trade = 0;
    }
  }
  money += trade * A[N - 1];
  printf("%lld\n", money);
  return 0;
}
