#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000;
int main() {
  int h, m, a;
  scanf("%d:%d", &h, &m);
  scanf("%d", &a);
  int x = m + 60 * h + a;
  h = (x / 60) % 24;
  m = x % 60;
  if (h < 10) cout << "0";
  cout << h;
  cout << ":";
  if (m < 10) cout << "0";
  cout << m << endl;
  return 0;
}
