#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  ;
  long long n;
  long long x = 1000;
  cin >> n;
  long long a[n + 4];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  a[n] = -1;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (a[j] < a[j - 1]) {
        if ((j - i) > 1) {
          int c = x / a[i];
          x += ((a[j - 1] - a[i]) * c);
        }
        i = j - 1;
        break;
      }
    }
  }
  cout << x;
}
