#include <bits/stdc++.h>
int main() {
  char times[5];
  int hours, mine;
  int new_mine, s;
  scanf("%s", times);
  scanf("%d", &new_mine);
  sscanf(times, "%d:%d", &hours, &mine);
  if (hours > 25 || hours < 0) {
    return 0;
  }
  if (mine > 60 || mine < 0) {
    return 0;
    ;
  }
  if (new_mine > 10000 || new_mine < 0) {
    return 0;
    ;
  }
  s = hours * 60 + mine + new_mine;
  s %= 24 * 60;
  hours = s / 60;
  mine = s % 60;
  if (hours < 10) {
    printf("0%d:", hours);
  }
  if (hours >= 10) {
    printf("%d:", hours);
  }
  if (mine < 10) {
    printf("0%d\n", mine);
  }
  if (mine >= 10) {
    printf("%d\n", mine);
  }
  return 0;
}
