#include <bits/stdc++.h>
using namespace std;
int A[200];
int main(int argc, const char** argv) {
  int n;
  cin >> n;
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int i = 1;
  while (1) {
    while (i < n && A[i - 1] >= A[i]) {
      i++;
    }
    if (i == n) {
      break;
    }
    int order = money / A[i - 1];
    stock += order;
    money -= order * A[i - 1];
    while (i < n && A[i - 1] <= A[i]) {
      i++;
    }
    if (i == n) {
      money += stock * A[i - 1];
      stock = 0;
      break;
    }
    money += stock * A[i - 1];
    stock = 0;
  }
  cout << money;
  return 0;
}
