a, b, c = map(int, input().split())
if a == b:
if b == c:
print("3")
if b != c:
print("2")
if a != b:
if a == c:
if b != c and a != c:
print("0")
a, b, c = map(int, input().split())
if a == b:
if b == c:
print("3")
if b != c:
print("2")
if a != b:
if b == c:
print("2")
if a == c:
print("2")
if b != c and a != c:
print("0")