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