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