#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long answer = 1000;
  long long stock = 0;
  long long low = a[0];
  long long high = a[0];
  for (long long i = 1; i < n; i++) {
    if (a[i] > low && stock == 0) {
      stock = answer / low;
      answer -= stock * low;
      low = 200;
    }
    if (a[i] < high) {
      answer += stock * high;
      stock = 0;
      high = 0;
    } else if (i == n - 1 && a[i] >= high) {
      answer += stock * a[i];
    }
    low = min(low, a[i]);
    high = max(high, a[i]);
  }
  cout << answer << "\n";
}
