#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> v(N);
  for (int i = 0; i < N; i++) {
    cin >> v.at(i);
  }
  int a = 0, b = 1000, c = 0, x, y, z;
  for (int i = 0; i < N; i++) {
    if (i == N - 1) {
      b = b + a * v.at(i);
      a = 0;
    } else if (a == 0 && v.at(i + 1) > v.at(i)) {
      a = b / v.at(i);
      b = b % v.at(i);
    } else if (v.at(i + 1) < v.at(i)) {
      b = b + a * v.at(i);
      a = 0;
    }
  }
  std::cout << b << '\n';
}
