#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, money = 1000, stock = 0;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v.at(i);
  for (int i = 0; i < n; i++) {
    if (i == n - 1) {
      money += v[i] * stock;
      stock = 0;
      break;
    }
    if (v.at(i) < v.at(i + 1)) {
      int order = money / v[i];
      money -= v[i] * order;
      stock += order;
    } else {
      money += v[i] * stock;
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
