#include <bits/stdc++.h>
using namespace std;
int main() {
  int h = 0, m = 0, add;
  scanf("%d:%d", &h, &m);
  scanf("%d", &add);
  m += add;
  h += m / 60;
  h %= 24;
  m %= 60;
  if (h < 10 && m < 10)
    printf("0%d:0%d\n", h, m);
  else if (h < 10)
    printf("0%d:%d\n", h, m);
  else if (m < 10)
    printf("%d:0%d\n", h, m);
  else
    printf("%d:%d\n", h, m);
}
