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