#include <bits/stdc++.h>
using namespace std;
int a[100];
int main() {
  int n, sk = 0, mn = 1000;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    if (a[i] <= a[i + 1] && (!i || a[i] < a[i - 1])) {
      sk += mn / a[i];
      mn -= mn / a[i] * a[i];
    }
    while (a[i] <= a[i + 1]) i++;
    mn += a[i] * sk;
    sk = 0;
  }
  printf("%d", mn);
}
