#include<bits/stdc++.h>
using namespace std;
int main()
{
double s,u,b,n,r;
int a,t,w;
cin>>s>>u;
a=8;
b=ceil(s/u)+10;
n=ceil(b/60);
w=a-n;
r=b-(n-1)*60;
t=60-r;
if(w<10)
{
if(t<10)
{
cout<<"0"<<w<<":"<<"0"<<t<<endl;
}
else cout<<"0"<<w<<":"<<t<<endl;
}
if(w<0)
{
if(t<10)
{
cout<<w+24<<":"<<"0"<<t<<endl;
}
else cout<<w+24<<":"<<t<<endl;
}
return 0;
}
明明测试都对,已提交只有70分