#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
int n, a[maxn];
int main() {
  memset(a, 0, sizeof(a));
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int low = a[1], mon = 1000;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      int num = mon / a[i - 1];
      mon = mon % a[i - 1];
      mon += num * a[i];
    }
  }
  cout << mon << endl;
  return 0;
}
