#include <bits/stdc++.h>
using namespace std;
vector<int> gV(int n) {
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  return v;
}
int* gA(int n) {
  int* arr = new int[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  return arr;
}
void solve() {
  long long n;
  cin >> n;
  long long* prices = new long long[n];
  for (int i = 0; i < n; i++) {
    cin >> prices[i];
  }
  long long profit = 1000, low, high;
  for (int i = 0; i < n - 1;) {
    if (prices[i] < prices[i + 1]) {
      low = prices[i];
      while (i < n - 1 && prices[i] <= prices[i + 1]) i++;
      high = prices[i];
      int bought = profit / low;
      profit -= (bought * low);
      int sold = (bought * high);
      profit += sold;
    } else
      i++;
  }
  cout << profit << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  solve();
  return 0;
}
