#include <bits/stdc++.h>
int main() {
  int hh, mm, a, h, m;
  scanf("%d:%d", &hh, &mm);
  scanf("%d", &a);
  h = a / 60;
  m = a % 60;
  hh = hh + h;
  mm = mm + m;
  if (mm >= 60) {
    mm = mm - 60;
    hh++;
  }
  if (hh >= 24) {
    hh = hh % 24;
  }
  printf("%d%d:%d%d\n", hh / 10, hh % 10, mm / 10, mm % 10);
  return 0;
}
