#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  set<int> s;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (s.find(a[i]) == s.end()) {
      s.insert(a[i]);
      v.push_back(a[i]);
    }
  }
  int x = v.size();
  vector<int> vv(x);
  int first = 0;
  for (auto u : v) {
    vv[first] = u;
    first++;
  }
  int ans = 1000;
  for (int i = 1; i < x; i++) {
    int yy = vv[i] - vv[i - 1];
    if (yy > 0) {
      ans = ans - ((ans / vv[i - 1]) * vv[i - 1]) + ((ans / vv[i - 1]) * vv[i]);
    }
  }
  cout << ans;
  return 0;
}
