#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[10];
  gets(a);
  int hour, minute, add_min, add_hour;
  cin >> add_min;
  hour = (a[0] - 48) * 10 + (a[1] - 48) * 1;
  minute = (a[3] - 48) * 10 + (a[4] - 48) * 1;
  minute = minute + add_min;
  if (minute >= 60) {
    add_hour = minute / 60;
    minute = minute % 60;
    hour = hour + add_hour;
  }
  hour = hour % 24;
  if (hour < 10) {
    cout << "0";
  }
  cout << hour << ":";
  if (minute < 10) {
    cout << "0";
  }
  cout << minute << endl;
  return 0;
}
