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