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