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