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