#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e15;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long mon = 1000;
  int cnt = 0;
  bool first = false;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1])
      continue;
    else if (a[i] > a[i + 1] && first) {
      mon += cnt * a[i];
      cnt = 0;
      first = false;
    } else if (a[i] > a[i + 1])
      continue;
    else if (a[i] < a[i + 1]) {
      first = true;
      cnt = mon / a[i];
      mon -= cnt * a[i];
    }
  }
  if (cnt > 0) {
    mon += cnt * a[n - 1];
  }
  cout << mon << endl;
  return 0;
}
