#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v;
  int flag = 0, mx = 0;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    v.push_back(temp);
    if (temp > mx) mx = temp;
    if (i != 0) {
      if (v[0] < v[i]) {
        flag = 1;
      }
    }
  }
  int crnt = 1000, rem = 0, sc;
  if (flag) {
    sc = crnt / v[0];
    rem = crnt % (v[0]);
    crnt = sc * v[0] + rem;
    for (int i = 1; i < v.size(); i++) {
      if (v[i] > v[i - 1]) {
        crnt = sc * v[i] + rem;
        sc = 0;
        rem = 0;
      } else if (v[i] < v[i - 1]) {
        sc = crnt / v[i];
        rem = crnt % v[i];
        crnt = sc * v[i] + rem;
      }
      if (v[i] == mx) break;
    }
    cout << crnt << "\n";
  } else
    cout << 1000 << "\n";
}
