#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto &i : a) cin >> i;
  int ans = 0;
  int money = 1000;
  for (int i = 0; i < n; i++) {
    int stocks = 0;
    if (a[i] < a[i + 1]) stocks = money / a[i];
    money += stocks * (a[i + 1] - a[i]);
  }
  cout << money << '\n';
  return 0;
}
