Inclusion exclusion + concept implementation

I am not understanding the question in this video that is the output for the input for ex for input =5 how the output is 4
can you please explain