#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];
  vector<pair<int, int>> p(0);
  int m = a[0];
  int M = a[0];
  long long now = 1000;
  for (int i = 1; i < n; ++i) {
    if (a[i] < a[i - 1]) {
      int num = now / m;
      now += num * (M - m);
      m = a[i];
      M = a[i];
    } else {
      if (m > a[i]) m = a[i];
      if (M < a[i]) M = a[i];
      if (i == n - 1) {
        int num = now / m;
        now += num * (M - m);
      }
    }
  }
  cout << now << endl;
}
