Let $a_1, ... ,a_5$ be real numbers such that at least $N$ of the sums $a_i+a_j$ ($i < j$) are integers. Find the greatest value of $N$ for which it is possible that not all of the sums $a_i+a_j$ are integers.
Problem
Source: 2002 Estonia National Olympiad Final Round grade 11 p4
Tags: Integers, number theory, Sum, max