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