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