#include <bits/stdc++.h>
int main(int argc, char** argv) {
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(0);
  std::cout << std::fixed << std::setprecision(6);
  std::cerr << std::fixed << std::setprecision(6);
  int N, A[88];
  std::cin >> N;
  for (int i = 0; i < N; i++) std::cin >> A[i];
  long long C = 1000;
  int a = A[0], b = A[0], c;
  c = C / a;
  C = C % a;
  for (int i = 1; i < N; i++) {
    if (A[i] <= b) {
      C += 1LL * b * c;
      a = b = A[i];
      c = C / a;
      C = C % a;
    } else {
      b = A[i];
    }
  }
  C += 1LL * b * c;
  std::cout << C << std::endl;
  return 0;
}
