#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 5;
int a[maxn];
int main() {
  int own = 1000;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int left = 0;
  int right = 1;
  while (right <= n) {
    if (a[left] < a[right]) {
      own = own / a[left] * a[right] + own % a[left];
      left = right;
      right++;
    } else if (a[left] >= a[right]) {
      left = right;
      right += 1;
    }
  }
  cout << own << endl;
  return 0;
}
