#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, money = 1000;
  cin >> n;
  int a[n + 1];
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  a[n] = 0;
  for (int i = 0; i < (n); i++) {
    int count = 0, kabu = 0;
    while (a[i] < a[i + 1]) {
      i++;
      count++;
    }
    kabu = money / a[i - count];
    money += (a[i] - a[i - count]) * kabu;
  }
  cout << money << endl;
  return 0;
}
