Problem

Source: Czech and Slovak Olympiad 2015, National Round, Problem 6

Tags: Divisibility, number theory, combinatorics, pigeonhole principle



Integer $n>2$ is given. Find the biggest integer $d$, for which holds, that from any set $S$ consisting of $n$ integers, we can find three different (but not necesarilly disjoint) nonempty subsets, such that sum of elements of each of them is divisible by $d$.