#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int s[N];
  int Money = 1000;
  map<int, int> sisan;
  vector<int> ud;
  for (int i = 0; i < N; i++) {
    cin >> s[i];
    if (i > 0) {
      if (s[i] > s[i - 1])
        ud[i - 1] = 1;
      else if (s[i] == s[i - 1])
        ud[i - 1] = 0;
      else
        ud[i - 1] = -1;
    }
  }
  vector<int>::iterator it_b = ud.begin(), it_s = ud.begin();
  int day = 0;
  while (it_s != ud.end() && it_b != ud.end()) {
    int amount = 0;
    while (*it_b <= 0) {
      it_b++;
      it_s++;
      day++;
    }
    amount = Money / s[day];
    Money = Money - s[day] * amount;
    sisan[s[day]] = amount;
    while (*it_b >= 0) {
      it_b++;
      it_s++;
      day++;
      if (s[day] <= Money) {
        amount = Money / s[day];
        Money = Money - s[day] * amount;
        sisan[s[day]] = amount;
      }
    }
    if (it_b == ud.end()) {
      for (auto ssn : sisan) {
        Money += s[day - 1] * ssn.second;
        sisan.erase(ssn.first);
      }
      break;
    }
  }
  cout << Money << endl;
  return 0;
}
