#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];
  long long mon = 1000;
  for (int i = 1; i <= n; i++) {
    if (a[i] >= a[i + 1]) {
      int num = mon / low;
      mon = mon % low;
      mon += num * a[i];
      low = a[i + 1];
    }
  }
  cout << mon << endl;
  return 0;
}
