def main(): z = int(input())//10 * 6 + 600 print(f'{z//60%24}:{z%60}') if __name__ == '__main__': main()