#include <bits/stdc++.h>
using namespace std;
template <class T>
string TS(T val) {
  ostringstream oss;
  oss << val;
  return oss.str();
}
template <class T>
T BP(T a, long long n, long long m = 0) {
  T res = 1;
  while (n) {
    if (n & 1) res = (m ? (res * a) % m : res * a);
    a = (m ? (a * a) % m : a * a);
    n >>= 1;
  }
  return res;
}
template <class T>
T ABS(T n) {
  if (n >= 0) return n;
  return -n;
}
long long GCD(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct ST {
  long long n, v, k;
  ST(long long n1, long long v1, long long k1) : n(n1), v(v1), k(k1) {}
  ST(long long n1, long long v1) : n(n1), v(v1) {}
  ST() {}
  bool operator<(const ST &other) const { return (n < other.n); }
};
int main() {
  string s1 = "Q", s2;
  long long n, m, k = 0, a = 0, b = 0, c = 0, l, r;
  scanf("%I64d:%I64d%I64d", &n, &m, &k);
  a = n * 60 + m + k;
  c = (m + k) % 60;
  n += (m + k) / 60;
  if (n % (24) <= 9) cout << "0";
  cout << n % (24) << ":";
  if (c <= 9) cout << "0";
  cout << c;
  return 0;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &v[i]);
  }
  return 0;
}
