#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int cmod = 998244353;
const long long int N = 100;
const long long int inf = 1e16 + 2;
void solve(long long int Case) {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int s = 0, m = 1000, mn = a[0], mx = a[0];
  for (long long int i = 0; i < n; i++) {
    mn = min(mn, a[i]);
    if (mx < a[i]) {
      s = (m / mn);
      m %= mn;
      mx = a[i];
      m += s * mx;
      mn = a[i];
      s = 0;
    }
  }
  cout << m + s * mx << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int testcase = 1;
  long long int Case = 1;
  while (testcase--) {
    solve(Case++);
  }
  return 0;
}
