#include <bits/stdc++.h>
using namespace std;
int a[85];
int main() {
  int n, i;
  long long ans = 1000, gp = 0;
  bool sell = 1;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i <= n; i++) {
    if (a[i] < a[i + 1] && sell) {
      sell = 0;
      gp = ans / a[i];
      ans %= a[i];
    }
    if (a[i] > a[i + 1] && !sell) {
      sell = 1;
      ans += gp * a[i];
      gp = 0;
    }
  }
  printf("%d\n", ans);
  return 0;
}
