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