Problem 4, thx hackerrank for mirror