#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p = 0, y = 1000, tp, ty;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (arr[i] < arr[j]) {
        tp = y / arr[i];
        y -= tp * arr[i];
        p += tp;
        break;
      } else if (arr[i] > arr[j]) {
        y += arr[i] * p;
        p = 0;
        break;
      } else {
        i = j;
        continue;
      }
    }
  }
  y += arr[n - 1] * p;
  cout << y << endl;
}
