Problem

Source: Belarusian olympiad 2022

Tags: combinatorics, segments



A positive integer $n$ is given. On the segment $[0,n]$ of the real line $m$ distinct segments whose endpoints have integer coordinates are chosen. It turned out that it is impossible to choose some of thos segments such that their total length is $n$ and their union is $[0,n]$ Find the maximum possible value of $m$