#include <bits/stdc++.h>
int main() {
  int n;
  int a[80];
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::cin >> a[i];
  }
  int money = 1000;
  int kabu = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (a[i] < a[i + 1]) {
      int num = money / a[i];
      kabu += num;
      money -= num * a[i];
    } else {
      money += kabu * a[i];
      kabu = 0;
    }
  }
  if (kabu) money += kabu * a[n - 1];
  std::cout << money;
  return 0;
}
