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