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