#include <bits/stdc++.h>
using namespace std;
void DBG() { cerr << "]\n"; }
template <typename T, typename... Args>
void DBG(T first, Args... args) {
  cerr << first;
  if (sizeof...(args)) cerr << ", ";
  DBG(args...);
}
long long int del_x[4] = {-1, 1, 0, 0};
long long int del_y[4] = {0, 0, 1, -1};
long long int XX[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
long long int YY[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
void solve() {
  long long int n;
  cin >> n;
  long long int a[n + 1];
  for (long long int i = 0; i < (n); i++) cin >> a[i];
  long long int ans = 1000;
  for (long long int i = 0; i < (n); i++) {
    if (a[i] < a[i + 1]) {
      long long int stocks = ans / a[i];
      ans -= a[i] * stocks;
      ans += a[i + 1] * stocks;
      i++;
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int t = 1;
  for (long long int tt = 1; tt <= t; tt++) {
    solve();
  }
}
