#include using namespace std; int main() { int n,h,m,t; cin>>n>>h>>m>>t; for(int i=1;i59){ m-=60; h++; if(h>23)h=0; } } cout<