#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 money = 1000;
  for (int i = 0; i < n; i++) {
    int st = a[i];
    int now = a[i];
    int j = i;
    while (j < n && now <= a[j]) {
      now = a[j];
      j++;
    }
    int end = a[j - 1];
    money += (money / st) * end - money / st * st;
    i = j - 1;
  }
  cout << money << endl;
}
