#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100], i;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int x = 1000, y = 0;
  for (i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      y = x / a[i];
      x = x % a[i];
      i++;
      x = x + y * a[i];
      y = 0;
    }
  }
  cout << x << endl;
}
