#include <bits/stdc++.h>
using namespace std;
void fastio() {
  cin.tie(nullptr);
  cin.sync_with_stdio(false);
}
using LL = long long;
using LD = long double;
const LL MOD = 1e9 + 7;
const LL INF = LLONG_MAX;
const LL N = 1e6 + 1;
int main() {
  fastio();
  LL n;
  cin >> n;
  vector<LL> a(n);
  for (auto &e : a) {
    cin >> e;
  }
  vector<int> dis;
  dis.push_back(a[0]);
  for (int i = 1; i < n; ++i) {
    if (a[i] != a[i - 1]) {
      dis.push_back(a[i]);
    }
  }
  int sz = dis.size();
  LL profit = 0, cur = 1000, st = cur / dis[0], price = dis[0];
  for (int i = 1; i < sz; ++i) {
    if (price < dis[i]) {
      profit += (dis[i] - price) * st;
      cur += profit;
      st = (cur) / dis[i];
      price = dis[i];
    } else {
      st = cur / dis[i];
      price = dis[i];
    }
  }
  cout << 1000 + profit << "\n";
}
