#include <bits/stdc++.h>
int d[104], n;
int dp[104];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &d[i]);
  for (int i = 2; i < n; i++) {
    if (d[i - 1] >= d[i] && d[i] <= d[i + 1]) dp[i] = -1;
    if (d[i - 1] <= d[i] && d[i] >= d[i + 1]) dp[i] = 1;
  }
  int money = 1000, stock = 0;
  if (d[1] < d[2]) stock = money / d[1], money -= d[1] * (money / d[1]);
  for (int i = 2; i <= n; i++) {
    if (dp[i] == -1) stock += money / d[i], money -= d[i] * (money / d[i]);
    if (dp[i] == 1) money += d[i] * stock, stock = 0;
  }
  money += d[n] * stock;
  printf("%d", money);
  return 0;
}
