#include <bits/stdc++.h>
int main() {
  int h, m, ans, t;
  char ch;
  scanf("%d%c%d", &h, &ch, &m);
  scanf("%d", &t);
  ans = h * 60 + m + t;
  h = ans / 60;
  if (h > 23) {
    h = h % 24;
  }
  m = ans % 60;
  printf("%.2d:%.2d\n", h, m);
}
