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