#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
int a[100];
int main() {
  int n, num, change;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int s = 1000;
  for (int i = 1; i < n; i++) {
    if (a[i + 1] > a[i]) {
      num = s / a[i];
      change = s % a[i];
      s = change;
      s += a[i + 1] * num;
    } else
      continue;
  }
  cout << s << '\n';
}
