#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int INF = 1e9;
const int MOD = 1000000007;
void test_case() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (auto &it : v) cin >> it;
  int money = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (v[i] < v[i + 1]) money = money % v[i] + (money / v[i]) * v[i + 1];
  }
  cout << money << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    test_case();
  }
  return 0;
}
