#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int cost = 1000;
  int have = 0;
  int a[81];
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> a[i];
  int flg[81] = {};
  int p = 1;
  while (a[1] == a[p] && p <= N) {
    p++;
    if (a[1] < a[p]) {
      flg[1] = 1;
      break;
    } else if (a[1] > a[p]) {
      break;
    }
  }
  int left = 0;
  for (int i = 2; i < N; i++) {
    if (a[i - 1] < a[i])
      left = 1;
    else if (a[i - 1] > a[i])
      left = -1;
    if (a[i] < a[i + 1] && left == -1)
      flg[i] = 1;
    else if (a[i] > a[i + 1] && left == 1)
      flg[i] = 2;
  }
  if (a[N] >= a[N - 1] && left != -1) {
    flg[N] = 2;
  }
  for (int i = 1; i <= N; i++) {
    if (flg[i] == 1) {
      int buy = cost / a[i];
      have += buy;
      cost -= buy * a[i];
    } else if (flg[i] == 2) {
      cost += have * a[i];
      have = 0;
    }
  }
  cout << cost << endl;
}
