#include <bits/stdc++.h>
using namespace std;
long long a[205] = {0};
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long ans = 1000, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] < a[i + 1]) {
      cnt = ans / a[i];
      ans = ans % a[i];
    } else if (cnt && a[i] > a[i + 1]) {
      ans += cnt * a[i];
      cnt = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
