#include <bits/stdc++.h>
using namespace std;
const int N = 100;
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  int sum = 1000;
  for (int i = 0; i + 1 < n; i++) {
    if (a[i] < a[i + 1] && sum >= a[i]) {
      sum = sum % a[i] + (sum / a[i]) * a[i + 1];
      i++;
    }
  }
  printf("%d\n", sum);
  return 0;
}
