#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n;
long long mon = 1000;
int a[220];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  a[n + 1] = 0;
  int s = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] < a[i + 1]) {
      s += mon / a[i];
      mon %= a[i];
    }
    if (a[i] > a[i + 1]) {
      mon += s * a[i];
      s = 0;
    }
  }
  cout << mon << endl;
  return 0;
}
