#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zeroupper")
#pragma GCC target("avx", "popcnt")
using namespace std;
const long long int INF = (long long int)1e17 + 5;
const unsigned long long int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> v(n, 0);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<int> dp(2 * (int)1e5 + 1, 0);
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      dp[v[i] + v[j]]++;
    }
  }
  int maxi = 0;
  for (int i = 0; i < dp.size(); i++) {
    maxi = max(maxi, dp[i]);
  }
  cout << maxi << "\n";
  return 0;
}
