#include<bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++)


int main() {
	cin.sync_with_stdio(false);
	string t;
	cin >> t;
	int a = (t[0] - '0') * 10 + (t[1] - '0');
	int b = (t[3] - '0') * 10 + (t[4] - '0');
	if (b + 5 >= 60) {
		b -= 60;
		a += 1;
	}
	if (a >= 24) {
		a -= 24;
	}
	if (a < 10) {
		cout << 0 << a;
	}
	else {
		cout << a;
	}
	cout << ":";
	if (b+5 < 10) {
		cout <<0<< b+5;
	}
	else {
		cout << b+5;
	}
	cout << endl;
	return 0;
}