#include <bits/stdc++.h>
using vi = std::vector<long long int>;
using vvi = std::vector<vi>;
using pii = std::pair<long long int, long long int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
using namespace std;
const long long int N = 2e6 + 10;
const long long int inf = 1e18 + 10;
const long double Pi = 3.14159265;
long long int n, a[N], rj, ans = 1e3, num;
void solve() {
  cin >> n;
  for (long long int i = 1; i <= n; i++) cin >> a[i];
  for (long long int i = 1; i <= n; i++) {
    num = ans / a[i];
    rj = i + 1;
    for (long long int j = i + 1; j <= n; j++) {
      rj = j;
      if (a[j] >= a[j - 1])
        rj = j;
      else
        break;
    }
    ans = max(ans, (a[rj] - a[i]) * num + ans);
    i = rj - 1;
  }
  cout << ans;
}
int32_t main() {
  solve();
  return 0;
  ;
  long long int xx = 0;
  long long int t;
  cin >> t;
  while (t--) {
    ;
    solve();
    cout << "\n";
  }
  return 0;
}
