#include <bits/stdc++.h>
using namespace std;
const int N = 200003;
int cnt[N], n, ans, a[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    for (int j = 1; j <= i - 1; j++) ++cnt[a[i] + a[j]];
  }
  for (int i = 1; i <= 200000; i++) ans = max(ans, cnt[i]);
  printf("%d\n", ans);
  return 0;
}
