#include <bits/stdc++.h>
using namespace std;
const int N = 2 + 100;
int main() {
  int n;
  int a[N];
  long long ret = 1000;
  int num = 0;
  cin >> n;
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int j = 0;
  for (; j < n; j++) {
    if (a[j] < a[j + 1]) {
      long long t = ret / a[j];
      ret -= t * a[j];
      num += t;
      break;
    }
  }
  for (int i = j; i < n; i++) {
    j = i;
    if (a[i] < a[i + 1]) {
      for (; i < n; i++) {
        if (a[i] > a[i + 1]) {
          long long t = num * a[i];
          ret += t;
          num = 0;
          break;
        }
      }
    } else
      for (; i < n; i++) {
        if (a[i] < a[i + 1]) {
          long long t = ret / a[i];
          ret -= t * a[j];
          num += t;
          break;
        }
      }
  }
  if (num != 0) {
    long long t = num * a[n - 1];
    ret += t;
  }
  cout << ret << endl;
}
