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