#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int& i : v) cin >> i;
  long long ans = 1000;
  vector<pair<long long, long long>> vaux;
  pair<int, int> pnow = {v[0], v[0]};
  for (int i = 0; i < n; i++) {
    if (i < n - 1 and v[i] > v[i + 1]) {
      vaux.push_back(pnow);
      pnow = {v[i + 1], v[i + 1]};
    } else
      pnow.second = max(pnow.second, v[i]);
  }
  vaux.push_back(pnow);
  for (auto u : vaux) {
    long long times = ans / u.first;
    ans = ans % u.first;
    ans += times * u.second;
  }
  cout << ans << '\n';
  return 0;
}
