#include <bits/stdc++.h>
int main() {
  int i, x, y, z, n, money = 1000, min;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) min = a[i];
  }
  for (i = 0; i < n; i++) {
    if (min == a[i] && i != n - 1)
      break;
    else {
      printf("%d", money);
      return 0;
    }
  }
  for (i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      y = money / a[i];
      money -= a[i] * y;
      continue;
    }
    if (a[i] > a[i + 1]) {
      z = y * a[i];
      money += z;
    }
  }
  return 0;
}
