#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a[85];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int s = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i]) {
      int x;
      x = s / a[i];
      s = s % a[i] + x * a[i + 1];
    }
  }
  printf("%d", s);
}
