#include int main(){ char A[3],B[3]; scanf("%s %s",A,B); double wB=6*((B[0]-'0')*10+(B[1]-'0')); double wA=30*((A[0]-'0')*10+(A[1]-'0'))+0.50*((B[0]-'0')*10+(B[1]-'0')); double R=wA-wB+360; while(R>=360)R-=360; //printf("wa %d wb %d R %d\n",wA,wB,R); printf("%.0f",120*R/11); return 0; }