#include <bits/stdc++.h>
using namespace std;
const int sz = 100000;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int h, m, hh, mm, minute;
  scanf("%d:%d%d", &h, &m, &minute);
  m += minute;
  hh = m / 60;
  h += hh;
  h %= 24;
  m %= 60;
  if (h < 10)
    cout << "0" << h << ":";
  else
    cout << h << ":";
  if (m < 10) cout << "0";
  cout << m << endl;
  return 0;
}
