#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int bvalue = 201;
  int num = 0;
  int money = 1000;
  for (int i = 0; i < n; i++) {
    if (bvalue < a[i]) {
      money += num * a[i];
      num = 0;
    }
    int j;
    int flag = false;
    for (j = i + 1; j < n; j++) {
      if (a[i] < a[j]) {
        flag = true;
        break;
      }
    }
    if (flag == false) {
      break;
    }
    for (int k = i + 1; k < j; k++) {
      if (a[i] > a[k]) {
        i = k - 1;
        goto End;
      }
    }
    bvalue = a[i];
    num += money / bvalue;
    money -= bvalue * num;
    i = j - 1;
  End:
    continue;
  }
  cout << money << endl;
}
