#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 j = 0, ans = 1000;
  for (int i = 0; i < n; i++) {
    if (a[i] > a[i + 1]) {
      sort(a.begin() + j, a.begin() + i);
      int b = *(a.begin() + j);
      int c = *(a.begin() + i);
      ans += (ans / b) * (c - b);
      j = i + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
