#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (auto &i : a) {
    cin >> i;
  }
  int money = 1000, j = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i]) {
      continue;
    } else {
      int stock = money / a[j];
      money = (money - (stock * a[j])) + (stock * a[i]);
      j = i + 1;
    }
  }
  if (j != (n - 1)) {
    int stock = money / a[j];
    money = (money - (stock * a[j])) + (stock * a[n - 1]);
  }
  cout << money << endl;
}
