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