#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (int)(n); ++i) cin >> a[i];
  int ans = 1000;
  int i = 0, s = 0;
  while (i < n - 1) {
    while (i + 1 < n && a[i] >= a[i + 1]) ++i;
    s = a[i];
    while (i + 1 < n && a[i] <= a[i + 1]) ++i;
    int x = ans / s;
    ans += (a[i] - s) * x;
  }
  cout << ans << endl;
  return 0;
}
