



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			[0] * len(SCREAMING_SNAKE_CASE_					)
			lowercase__   					=			[]
			lowercase__   					=			[1] * len(SCREAMING_SNAKE_CASE_					)

			for values in graph.values():
						for i in values:
									indegree[i] += 1

			for i in range(len(SCREAMING_SNAKE_CASE_					)					):
						if indegree[i] == 0:
									queue.append(SCREAMING_SNAKE_CASE_					)

			while queue:
						lowercase__   					=			queue.pop(0					)
						for x in graph[vertex]:
									indegree[x] -= 1

									if long_dist[vertex] + 1 > long_dist[x]:
												lowercase__   					=			long_dist[vertex] + 1

									if indegree[x] == 0:
												queue.append(SCREAMING_SNAKE_CASE_					)

			print(max(SCREAMING_SNAKE_CASE_					)					)


# Adjacency list of Graph
lowercase_						=       {0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}




longest_distance(graph)









def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			1  # To kept the Calculated Value
			# Since C(n, k) = C(n, n-k)
			if k > (n - k):
						lowercase__   					=			n - k
			# Calculate C(n,k)
			for i in range(SCREAMING_SNAKE_CASE_					):
						result *= n - i
						result //= i + 1
			return result



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			return binomial_coefficient(2 * node_count  ,					SCREAMING_SNAKE_CASE_					) // (node_count + 1)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			if n < 0:
						raise ValueError("factorial() not defined for negative values"					)
			lowercase__   					=			1
			for i in range(1  ,					n + 1					):
						result *= i
			return result



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			return catalan_number(SCREAMING_SNAKE_CASE_					) * factorial(SCREAMING_SNAKE_CASE_					)


if __name__ == "__main__":
							lowercase_						=       int(input("""Enter the number of nodes: """).strip() or 0)
							if node_count <= 0:
														raise ValueError("""We need some nodes to work with.""")
							print(
							    F'Given {node_count} nodes, there are {binary_tree_count(node_count)} '
							    F'binary trees and {catalan_number(node_count)} binary search trees.'
							)




