#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 okane = 1000;
  int shou = a[0];
  for (int i = 0; i < n - 1; i++) {
    shou = a[i];
    for (int j = i + 1; j < n; j++) {
      if (shou < a[j]) {
        okane = (okane / shou) * a[j] + okane % shou;
        i = j - 1;
        shou = a[j];
        break;
      }
      shou = min(a[j], shou);
    }
  }
  cout << okane << endl;
}
