#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; if(a==b) cout<<"O JOGO DUROU 24 HORA(S)"; else printf("O JOGO DUROU %d HORA(S)",(b+24-a)%24); return 0; }