#include <bits/stdc++.h>
int main() {
  char time[6];
  int minute, hour;
  scanf("%s %d", time, &minute);
  minute = minute + ((time[4] - '0') + (time[3] - '0') * 10);
  hour = (time[1] - '0') + (time[0] - '0') * 10;
  hour = hour + minute / 60;
  minute = minute % 60;
  hour = hour % 24;
  if (hour < 10) printf("0");
  printf("%d:", hour);
  if (minute < 10) printf("0");
  printf("%d", minute);
  return 0;
}
