#include using namespace std; #define int long long signed main(){ int A,B; cin>>A>>B; char a,b,c; cin>>a>>b>>c; int T = 60*A+B+2340; double S; cin>>S; S *= 10; T += (int)(6*S); T %= 1440; if(T/60 < 10) cout<<0; cout<