#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int oo = 1e9;
const int M = 1e5 + 10;
const long double PI = acos(-1);
int n;
int a[1000];
int an;
int ans[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      ans[a[i] + a[j]]++;
      an = max(an, ans[a[i] + a[j]]);
    }
  }
  cout << an;
  return 0;
}
