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