#include <bits/stdc++.h>
using namespace std;
map<int, int> M;
vector<int> V[200005];
int A[200005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, ans, ns, ne;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  ans = 1000;
  for (int i = 1; i < n; i++) {
    ns = 0;
    if (A[i + 1] > A[i]) ns = ans / A[i];
    ans += (A[i + 1] - A[i]) * ns;
  }
  cout << ans;
  return 0;
}
