#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  int arr[a];
  for (int i = 0; i < a; i++) cin >> arr[i];
  int cur = 1000, num = 0;
  for (int i = 0; i < a - 1; i++) {
    if (arr[i] < arr[i + 1]) {
      if (num != 0) cur += num * arr[i];
      num = cur / arr[i], cur -= (cur / arr[i]) * arr[i];
    } else if (arr[i] > arr[i + 1])
      cur += num * arr[i], num = 0;
  }
  if (num != 0) cur += arr[a - 1] * num;
  cout << cur << endl;
}
