D1,D2 = map(int,input().split()) if D2 < D1: print(0) elif D1==D2: print(4) elif D1