#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> list(N);
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < (N); ++i) {
    cin >> list[i];
  }
  for (int i = 0; i < (N - 1); ++i) {
    if (list[i] < list[i + 1]) {
      stock = money / list[i];
      money = money - list[i] * stock + list[i + 1] * stock;
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
