#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  a[0] = 201;
  int min = 200;
  int ans = 1000;
  for (int i = 1; i <= n; i++) {
    if (a[i] < min) min = a[i];
    if (i == n) {
      if (min < a[n]) {
        ans += (a[n] - min) * (ans / min);
      }
    } else if (a[i - 1] <= a[i] && a[i] > a[i + 1]) {
      ans += (a[i] - min) * (ans / min);
      min = a[i];
    }
  }
  cout << ans << endl;
  return 0;
}
