#include <bits/stdc++.h>
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math")
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int INF = 1e9 + 7;
int _;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int n, cash = 1000;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int l = 0;
  while (l < n) {
    while (l + 1 < n && A[l] >= A[l + 1]) ++l;
    int cnt = cash / A[l];
    cash -= cnt * A[l];
    int r = l;
    while (r + 1 < n && A[r] <= A[r - 1]) ++r;
    cash += cnt * A[r];
    l = r;
    if (l == n - 1) break;
  }
  cout << cash << '\n';
  return 0;
}
