#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int tk = 1000, x = 0;
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    for (int i = 0; i < n; i++) {
      int j = i + 1;
      int k = i;
      bool flag = false;
      while (arr[j] > arr[k]) {
        if (j >= n) break;
        flag = true;
        if (j == n - 1) break;
        j++;
        k++;
      }
      if (flag) {
        int l = arr[j];
        x = tk / arr[i];
        tk -= (x * arr[i]);
        tk += (x * l);
        i = j;
      }
    }
    cout << tk << endl;
  }
  return 0;
}
