#include <bits/stdc++.h>
int main() {
  int hh, mm, a, hour, minute;
  scanf("%d:%d", &hh, &mm);
  scanf("%d", &a);
  hour = hh;
  minute = mm;
  minute += a % 60;
  if (minute > 59) {
    minute -= 60;
    hour += 1;
    if (hour > 23) {
      hour -= 24;
    }
  }
  hour += a / 60;
  for (; hour > 23; hour -= 24) {
    ;
  }
  printf("%02d:%02d", hour, minute);
  return 0;
}
