#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int money = 1000;
  vector<int> s(0);
  vector<int> e(0);
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      if (a[i] < a[i + 1]) {
        s.push_back(0);
      }
      continue;
    }
    if (i == n - 1) {
      e.push_back(i);
      break;
    }
    if (a[i] < a[i + 1] && a[i] <= a[i - 1]) {
      s.push_back(i);
    }
    if (a[i] > a[i + 1] && a[i] >= a[i - 1]) {
      e.push_back(i);
    }
  }
  for (int i = 0; i < s.size(); i++) {
    long long int t = money / a[s[i]];
    money %= a[s[i]];
    money += a[e[i]] * t;
  }
  cout << money;
}
