#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m = 1000;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (i != 0) {
      if (a[i] > a[i - 1]) {
        int x = m / a[i - 1];
        m = m - (a[i - 1] * x);
        while (i + 1 < n && a[i + 1] > a[i]) {
          i++;
        }
        m = m + (a[i] * x);
      }
    }
  }
  cout << m << endl;
  return 0;
}
