#include <bits/stdc++.h>
using namespace std;
void scan(char*, int*, int*);
void add(int*, int*, int);
int main() {
  char arr[10];
  int hours = 0, minutes = 0;
  int min_to_add = 0;
  scanf("%s", arr);
  scanf("%d", &min_to_add);
  scan(arr, &hours, &minutes);
  add(&hours, &minutes, min_to_add);
  printf("%02d:%02d", hours, minutes);
  return 0;
}
void scan(char* temp, int* hours, int* minutes) {
  *hours = 10 * (temp[0] - '0') + temp[1] - '0';
  *minutes = 10 * (temp[3] - '0') + temp[4] - '0';
  return;
}
void add(int* orh, int* orm, int add1) {
  *orh += add1 / 60;
  *orm += add1 % 60;
  if (*orm >= 60) {
    (*orh)++;
  }
  *orh = *orh % 24;
  *orm = *orm % 60;
  return;
}
