#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<int> a(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  vector<bool> up(N, false);
  for (int i = 1; i < N; i++) {
    if (a[i] > a[i - 1]) up[i] = true;
  }
  int money = 1000;
  int kabu = 0;
  int m = 201;
  for (int i = 0; i < N; i++) {
    if (up[i]) {
      kabu = money / m;
      money -= kabu * m;
      money += kabu * a[i];
      m = a[i];
    } else {
      m = min(m, a[i]);
    }
  }
  cout << money << endl;
}
