#include <bits/stdc++.h>
using namespace std;
long long a[82], sum = 1000, t = 0;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (a[i + 1] > a[i]) {
      t = sum / a[i];
      sum = sum % a[i];
    }
    if (a[i + 1] < a[i]) {
      sum += a[i] * t;
      t = 0;
    }
  }
  cout << sum;
  return 0;
}
