#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, kabu, money, allkabu;
  kabu = 0;
  allkabu = 0;
  money = 1000;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  for (int j = 0; j < N - 1; j++) {
    if (vec.at(j) < vec.at(j + 1)) {
      kabu = money / vec.at(j);
      allkabu += kabu;
      money = money - kabu * vec.at(j);
    } else {
      money = money + allkabu * vec.at(j);
      allkabu = 0;
    }
    kabu = 0;
  }
  if (allkabu != 0) money += allkabu * vec.at(N - 1);
  cout << money;
}
