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