#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1001001001;
int main(void) {
  int n;
  cin >> n;
  vector<int> atai(n), tf(n);
  ll mon = 1000, kabu = 0, maxi = 0, mini = 201;
  for (int i = 0; i < (int)(n); i++) {
    cin >> atai.at(i);
    if (i != 0 && atai.at(i) == atai.at(i - 1)) continue;
    if (atai.at(i) > maxi && atai.at(i) < mini) {
      maxi = atai.at(i);
      mini = atai.at(i);
    }
    if (atai.at(i) > maxi) {
      kabu = mon / mini;
      mon = mon - kabu * mini;
      mon += kabu * atai.at(i);
      kabu = 0;
      mini = 201;
      maxi = 0;
    } else if (atai.at(i) < mini)
      mini = atai.at(i);
  }
  cout << mon << endl;
  return 0;
}
