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