#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int x = 1000;
  for (int 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 << endl;
  return 0;
}
