#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int64_t n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < (int)(n); i++) cin >> vec[i];
  int64_t money = 1000;
  int64_t min = 300;
  for (int i = 0; i < (int)(n); i++) {
    int64_t x = vec[i];
    if (min < x) {
      if (vec[i + 1] < x) {
        money += (x - min) * (money / min);
        min = 300;
      }
    } else
      min = x;
  }
  cout << money << endl;
}
