word = input().split() word1 = word[0] word2 = word[1] if word[0][::-1] == word[1]: print("1") else: print('0')