#include <bits/stdc++.h>
using namespace std;
string s;
int a;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s >> a;
  int heures = (s[0] - '0') * 10 + (s[1] - '0');
  int minutes = (s[3] - '0') * 10 + (s[4] - '0');
  int aux = (minutes + a) % 60;
  int aux2 = (minutes + a) / 60;
  int aux3 = (heures + aux2) % 24;
  cout << aux3 / 10 << aux3 % 10 << ":" << aux / 10 << aux % 10;
  return 0;
}
