#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int y = 1000, m = 0;
  int min, max;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] <= a[i + 1]) {
      min = a[i];
      while (i < n - 1 && a[i] <= a[i + 1]) {
        max = a[i + 1];
        i++;
      }
      m = y / min;
      y = y % min;
      y += m * max;
      m = 0;
    }
  }
  printf("%d\n", y);
}
