string=input().split() str1=string[0] str2=string[1] i=0 j=-1 while i <len(str1): if str1[i]==str2[j]: i=i+1 j=j-1 if i==len(str1): print(1) else: print(0) break