#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int MOD = 1e9 + 7;
const int N = 1e6 + 6;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> vec(n + 1);
  for (int i = 0; i < n; i++) cin >> vec[i];
  long long int money = 1000, stk = 0, ans = money;
  for (int i = 1; i <= n; i++) {
    if (vec[i] > vec[i - 1]) {
      stk = money / vec[i - 1];
      money %= vec[i - 1];
    } else if (vec[i] < vec[i - 1]) {
      money += stk * vec[i - 1];
      stk = 0;
      ans = max(ans, money);
    }
  }
  cout << ans << '\n';
  return 0;
}
