#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using vec = vector<T>;
const int MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vec<int> A(0);
  int length = 0;
  for (int i = 0; i < N; i++) {
    int tmp;
    cin >> tmp;
    if (i == 0) {
      A.push_back(tmp);
      length++;
    } else {
      if (A[length - 1] != tmp) {
        A.push_back(tmp);
        length++;
      } else {
        continue;
      }
    }
  }
  int Money = 1000;
  int num_of_Stock = 0;
  for (int i = 0; i < length - 1; i++) {
    if (A[i] < A[i + 1]) {
      num_of_Stock = Money / A[i];
      Money = Money - A[i] * num_of_Stock;
    } else {
      Money = Money + A[i] * num_of_Stock;
      num_of_Stock = 0;
    }
  }
  Money = Money + A[length - 1] * num_of_Stock;
  num_of_Stock = 0;
  cout << Money << endl;
  return 0;
}
