#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
void solve(){
int n;
cin >> n;
vector<int> a(n);
for(auto &i: a) cin >> i;
int maxElem = a[1];
for(int i = 3; i < n; i += 2) maxElem = max(maxElem, a[i]);
cout << maxElem;
}
signed main() {
solve();
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
void solve(){
int n;
cin >> n;
vector<int> a(n);
for(auto &i: a) cin >> i;
int maxElem = a[1];
for(int i = 3; i < n; i += 2) maxElem = max(maxElem, a[i]);
cout << maxElem;
}
signed main() {
solve();
}