#include <bits/stdc++.h>
using namespace std;
inline int ctoi(char c) {
  if (c < '0' || '9' < c) throw invalid_argument("ctoi error");
  return c - '0';
}
template <typename T>
inline T gcd(T x, T y) {
  if (x <= 0 || y <= 0) throw invalid_argument("gcd error: x <= 0 or y <= 0");
  if (x < y) swap(x, y);
  T r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
template <typename T>
inline T lcm(T x, T y) {
  if (x <= 0 || y <= 0) throw invalid_argument("lcm error: x <= 0 or y <= 0");
  return x * y / gcd(x, y);
}
int main() {
  int n;
  cin >> n;
  vector<int> input(n);
  int ans = 1000;
  int stock = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> input[i];
  }
  for (int i = 0; i < (int)(n - 1); i++) {
    if (0 < stock) {
      ans += stock * input[i];
      stock = 0;
    }
    if (input[i] < input[i + 1]) {
      stock += ans / input[i];
      ans -= stock * input[i];
    }
  }
  if (0 < stock) ans += stock * input[n - 1];
  cout << ans;
  return 0;
}
