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