#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, m, a;
  scanf("%d:%d %d", &h, &m, &a);
  int time = h * 60 + m + a;
  h = (time / 60) % 24;
  m = time % 60;
  printf("%02d:%02d\n", h, m);
  return 0;
}
