https://medium.com/@eyajamuehaque/1283a-minutes-before-the-new-year-codeforces-solution-in-c-c5b3b86a7975