Quido is sending a new year greeting to his friend Hugo, and he prints the card on a high precision plotter.
The plotter works in two steps. First it plots a pattern of n dots on the paper. Then it draws a straight segment between every pair of dots that lie exactly 2018 length units apart.
The plotter prints with a special holographic ink that is in short supply, so Quido wants to know how many segments the picture contains before he starts the job.