#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
// 数据准备,输入
int time = 0, pass = 0, hour = 0, hour_1 = 0, minute = 0, minute_1 = 0;
cin >> time >> pass; // 输入起始时间、经过时间
hour = time / 100;
minute = time % 100;
hour_1 = pass / 60;
minute_1 = pass % 60;
// 定义输出数据
int hour_2 = hour + hour_1;
int minute_2 = minute + minute_1;
// 输出值的判断条件
if (minute + minute_1>= 60)
{
hour_2 += 1;
minute_2 -= 60;
}
if (minute_2 < 0)
{
hour_2 -= 1; // minute_2为负,需借位
minute_2 = 60 + minute_2;
}
cout << hour_2;
cout<<setw(2)<<setfill('0')<<minute_2 << endl; // 分钟输出时为’0‘,需输出‘00’
return 0;