Try this

=IF(OR(C4=C5-1,C3=C4-1),TRUE,FALSE)
Regards