from collections import defaultdict m = defaultdict(int) for _ in range(3): m[input()] += 1 print(max(m))