#include <bits/stdc++.h>
using namespace std;
const int N = 81;
int n, k, a[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int num = 0, s = 1000;
  for (int i = 0; i < n; ++i)
    if (num && (i == n - 1 || a[i] > a[i + 1])) {
      s += num * a[i];
      num = 0;
    } else if (!num && i < n - 1 && a[i] < a[i + 1]) {
      num = s / a[i];
      s -= num * a[i];
    }
  cout << s << endl;
  return 0;
}
