N = input() print(N.count('3'))