#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long money = 1000;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a.at(i);
  }
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a.at(i) <= a.at(i + 1)) {
      int x = money / a.at(i);
      money -= (x * a.at(i));
      money += (x * a.at(i + 1));
    }
  }
  cout << money;
}
