#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int sum = 1000;
  long long int last = 0;
  std::vector<long long int> v;
  std::vector<long long int> diff;
  for (int i = 0; i < n; i++) {
    long long int tmp;
    cin >> tmp;
    v.push_back(tmp);
    if (i == 0) {
      diff.push_back(0);
    } else {
      diff.push_back(tmp - v[i - 1]);
      if (tmp - v[i - 1] > 0) last = i;
    }
  }
  long long int num = 0;
  for (int i = 0; i < n - 1; i++) {
    if (diff[i + 1] == 0) {
      continue;
    } else if (diff[i + 1] > 0) {
      num = sum / v[i];
      sum = sum % v[i];
      if (i + 1 == last) {
        sum += num * v[i + 1];
        break;
      }
    } else {
      sum += num * v[i];
      num = 0;
    }
  }
  cout << sum << endl;
  return 0;
}
