#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int a = 1000;
  int b_money = 1000 % v[0], b_kabu = 1000 / v[0];
  for (int i = 1; i < n; i++) {
    int a_cp = a;
    if (a < b_money + b_kabu * v[i]) {
      a = b_money + b_kabu * v[i];
    }
    if (b_kabu < a_cp / v[i]) {
      b_money = a_cp % v[i];
      b_kabu = a_cp / v[i];
    }
  }
  cout << a << "\n";
}
