#include void main(void){ int m,d; scanf("%d %d",&m,&d); if(m < 8 || m == 8 && d < 22){ printf("23"); }else{ printf("24"); } }