#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
void remove(std::vector<int> &v) {
  auto end = v.end();
  for (auto it = v.begin(); it != end; ++it) {
    end = std::remove(it + 1, end, *it);
  }
  v.erase(end, v.end());
}
void solve() {
  int n;
  cin >> n;
  vector<int> x;
  for (int i = 0; i < n; i++) {
    int u;
    cin >> u;
    x.push_back(u);
  }
  remove(x);
  long long profit = 0;
  long long money = 1000;
  for (int i = 0; i < x.size() - 1; i++) {
    if (x[i + 1] > x[i]) {
      int v = money / x[i];
      profit = (x[i + 1] - x[i]) * v;
      money += profit;
      i++;
    }
  }
  cout << money;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
