#include <bits/stdc++.h>
using namespace std;
int n, arr[100];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  int ans = 1000, s = 0;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i] < arr[i + 1]) {
      s = ans / arr[i];
      ans = ans % arr[i];
    } else if (arr[i] > arr[i + 1]) {
      ans += arr[i] * s;
      s = 0;
    }
  }
  ans += s * arr[n - 1];
  cout << ans << endl;
}
