#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9, PI = acos(-1.);
const int INF = 0x3f3f3f3f, MOD = 1e9 + 7;
const int N = 1e3 + 5, M = 2e5 + 5;
int n;
int v[N];
int ans;
int cnt[M];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      ans = max(ans, ++cnt[v[i] + v[j]]);
    }
  printf("%d\n", ans);
  return 0;
}
