## https://yukicoder.me/problems/no/525 def main(): T = input() h, m = map(int, T.split(':')) total_minute = h * 60 + m total_minute += 5 total_minute %= 24 * 60 h = total_minute // 60 m = total_minute % 60 vv = 10000 + h * 100 + m vv = str(vv) answer = vv[1:3] + ":" + vv[3:5] print(answer) if __name__ == '__main__': main()