#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int yen = 1000, stock = 0, n, i, x, z;
  cin >> n;
  long long int arr[n + 2];
  for (i = 1; i <= n; i++) cin >> arr[i];
  i = 1;
  while (i < n) {
    if (arr[i] < arr[i + 1]) {
      x = yen / arr[i];
      stock += x;
      yen -= (x * arr[i]);
      z = (stock * arr[i + 1]);
      stock = 0;
      yen += z;
      i += 2;
    } else
      i++;
  }
  cout << yen << endl;
  return 0;
}
