#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int rem, tmp, cur = 1000, maxx;
  for (int i = 0; i < n; i++) {
    maxx = cur;
    for (int j = i + 1; j < n; j++) {
      if (arr[j] > arr[i]) {
        tmp = cur / arr[i];
        rem = cur % arr[i];
        maxx = max(maxx, (tmp * arr[j]) + rem);
      } else {
        i = j - 1;
        break;
      }
    }
    cur = max(cur, maxx);
  }
  cout << cur;
  return 0;
}
