#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  int n = 0, money = 1000;
  cin >> n;
  ;
  vector<int> price(n);
  for (long long i = 0; i < long long(n); i++) {
    cin >> price.at(i);
    ;
  }
  for (long long i = 0; i < long long(n - 1); i++) {
    if (price.at(i) < price.at(i + 1)) {
      int stock = money / price.at(i);
      money += (price.at(i + 1) - price.at(i)) * stock;
    }
  }
  cout << money << endl;
  ;
  return 0;
}
