#include <bits/stdc++.h>
#pragma GCC target("sse4,avx")
void run(std::istream& in, std::ostream& out) {
  std::string s;
  in >> s;
  int h = (s[0] - '0') * 10 + (s[1] - '0');
  int m = (s[3] - '0') * 10 + (s[4] - '0');
  int t = h * 60 + m;
  int a;
  in >> a;
  t = (t + a) % 1440;
  h = t / 60;
  m = t % 60;
  out << (h / 10) << (h % 10) << ":" << (m / 10) << (m % 10) << std::endl;
}
int main() {
  std::cin.sync_with_stdio(false);
  std::cin.tie(nullptr);
  run(std::cin, std::cout);
  return 0;
}
