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