#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(nullptr);
  int n, i, tmp, j, sum, cnt, val;
  bool flag;
  cin >> n;
  int arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  sum = 1000;
  cnt = 0;
  for (i = 0; i < n - 1; i++) {
    tmp = arr[i];
    flag = true;
    for (j = i + 1; j < n; j++) {
      if (arr[j] < tmp) {
        flag = false;
        break;
      }
    }
    if (flag && sum > 0) {
      val = sum / tmp;
      cnt += val;
      sum -= val * tmp;
    } else
      sum += cnt * tmp, cnt = 0;
  }
  tmp = arr[n - 1];
  flag = false;
  for (i = n - 2; i >= 0; i--) {
    if (arr[i] < tmp) {
      flag = true;
      break;
    }
  }
  if (flag) sum += tmp * cnt;
  cout << sum << '\n';
  return 0;
}
