N = int(input()) a = N // 100 b = (N // 10) % 10 c = N % 10 if a == b or a == c or b == c: print(1) else: print(0)
0