#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
vector<long long> Freq(1e5 + 1e5);
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long a[n];
  for (auto &it : a) cin >> it;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) Freq[a[i] + a[j]]++;
  cout << *max_element((Freq).begin(), (Freq).end()) << endl;
}
