##find number of edges in the star network

##i will use simple solution ,i will create a start netwok of n edges.Then we will count edges.

##we know the solution it will be n-1 edges

G={}  ##same old solution


def make_link(G,node1,node2):
	if node1 not in G:
		G[node1]={}	
	G[node1][node2]=1
	if node2 not in G:
		G[node2]={}
	G[node2][node1]=1


def make_star(n):
	# i will take one node and connect all the node from it,for simplicity i will take last node in n as center node
	center=n
	for i in xrange(1,n):
		make_link(G,center,i)

	


make_star(6)
##number of edges in start network

print sum([len(G[key]) for key in G.keys()])/2
	
		
