#include <bits/stdc++.h>
using namespace std;
int main() {
  int num;
  long long have = 1000;
  long long kabu = 0;
  long long lastHave = 1000;
  cin >> num;
  vector<int> vec(num);
  for (int i = 0; i < num; i++) cin >> vec.at(i);
  bool buy = true;
  for (int i = 0; i < num; i++) {
    if (buy == true) {
      int Min = vec.at(i);
      for (int j = i + 1; j < num; j++) {
        if (vec.at(i) >= vec.at(j)) Min = min(Min, vec.at(j));
        if (vec.at(i) < vec.at(j) || j == num - 1) {
          lastHave = have;
          kabu = have / Min;
          have = have % Min;
          i = j - 1;
          buy = false;
          break;
        }
      }
      if (i == num - 1) {
        lastHave = have;
        kabu = have / Min;
        have = have % Min;
        break;
      }
    } else {
      int Max = vec.at(i);
      for (int j = i + 1; j < num; j++) {
        if (vec.at(i) <= vec.at(j)) Max = max(Max, vec.at(j));
        if (vec.at(i) > vec.at(j) || j == num - 1) {
          have += kabu * Max;
          kabu = 0;
          i = j - 1;
          buy = true;
          break;
        }
      }
      if (i == num - 1) {
        have += kabu * Max;
        kabu = 0;
        break;
      }
    }
  }
  if (kabu != 0)
    cout << lastHave;
  else
    cout << have;
}
