#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 3e5 + 5;
const int oo = 1e9 + 5;
const long long int ooll = (long long int)1e18 + 5;
const int MOD = 1e9 + 7;
const int M = 20005;
clock_t start = clock();
int v[N];
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> v[i];
  long long int have = 1000;
  for (int i = 0; i < n; ++i) {
    int jb = n, mx = v[i];
    for (int j = i; j < n; ++j) {
      if (v[j] < v[i]) {
        jb = j;
        break;
      } else {
        mx = max(mx, v[j]);
      }
    }
    long long int go = have / v[i];
    have -= go * v[i];
    have += go * mx;
    i = jb - 1;
  }
  cout << have << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
