#include <bits/stdc++.h>
const long long INF = 1e18;
int main() {
  int N, i, amt = 1000, today, tomorrow, stock = 0;
  std::cin >> N;
  std::vector<int> rate(N + 1, 0);
  for (int i = 0; i < N; ++i) std::cin >> rate[i];
  for (i = 1; i <= N; ++i) {
    today = rate[i - 1], tomorrow = rate[i];
    if (today > tomorrow) {
      amt += (stock * today);
      stock = 0;
    } else if (today == tomorrow)
      continue;
    else {
      if (stock > 0) {
        amt += (stock * today);
        stock = 0;
      }
      stock = amt / today;
      amt -= stock * today;
    }
  }
  std::cout << amt << std::endl;
  ;
  return 0;
}
