#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const int INF = (int)1e9 + 7;
const int MAXN = (int)2e6 + 7;
long long n;
int main() {
  int h, m;
  char ch;
  cin >> h >> ch >> m;
  int t1 = h * 60 + m;
  int add;
  cin >> add;
  t1 += add;
  t1 %= 24 * 60;
  printf("%02d:%02d", t1 / 60, t1 % 60);
  return 0;
}
