#include <bits/stdc++.h>
using ll = long long;
using namespace std;
double Mcos(double k) { return cos(k * atan(1.0) * 4 / 180); }
string monmo(int a, int b, int c) {
  if (b > a && c > b) {
    return "Yes";
  } else {
    return "No";
  }
}
int main() {
  int money = 1000;
  int hikae = 0;
  int n;
  int flag = 0;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int niti = 0;
  while (niti < n) {
    int i = niti;
    flag = 0;
    niti++;
    int kabu = v[i];
    for (int j = i + 1; j < n; j++) {
      if (kabu >= v[j]) {
        kabu = v[j];
        niti++;
      } else {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      cout << money;
      exit(0);
    }
    hikae = money / kabu;
    money = money % kabu;
    money += hikae * v[niti];
  }
  cout << money;
}
