Solution of 2019 MTAP Elimination Round for Grade 5 - Question #14