from collections import Counter print sum(c>1 for c in Counter(raw_input().split()).values())