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