#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  int m = 1000, stonks = 0;
  int tobuy = 0, tosell = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i) {
      if (a[i] < a[i - 1]) {
        if (stonks) {
          m += stonks * a[tosell];
          stonks = 0;
        }
        tobuy = i;
      } else if (a[i] > a[i - 1]) {
        int x = m / a[tobuy];
        m -= x * a[tobuy];
        stonks += x;
        tosell = i;
      }
    }
  }
  if (stonks) m += stonks * a[tosell];
  cout << m << "\n";
  return 0;
}
