




from __future__ import annotations

_A     =			[]





def __UpperCamelCase			(       _A ,  _A ,  _A  ):
						for i in range(len(_A  )  ):
												if board[row][i] == 1:
																		return False
						for i in range(len(_A  )  ):
												if board[i][column] == 1:
																		return False
						for i, j in zip(range(_A ,  -1 ,  -1  ) ,  range(_A ,  -1 ,  -1  )  ):
												if board[i][j] == 1:
																		return False
						for i, j in zip(range(_A ,  -1 ,  -1  ) ,  range(_A ,  len(_A  )  )  ):
												if board[i][j] == 1:
																		return False
						return True





def __UpperCamelCase			(       _A ,  _A  ):
						if row >= len(_A  ):
												solution.append(_A  )
												printboard(_A  )
												print()
												return True
						for i in range(len(_A  )  ):
												if is_safe(_A ,  _A ,  _A  ):
																		lowerCAmelCase_      			=  1
																		solve(_A ,  row + 1  )
																		lowerCAmelCase_      			=  0
						return False





def __UpperCamelCase			(       _A  ):
						for i in range(len(_A  )  ):
												for j in range(len(_A  )  ):
																		if board[i][j] == 1:
																								print('''Q''' ,  end=''' '''  )
																		else:
																								print('''.''' ,  end=''' '''  )
												print()


# n=int(input("The no. of queens"))
_A     =			8
_A     =			[[0 for i in range(n)] for j in range(n)]
solve(board, 0)






print('''The total no. of solutions are :''', len(solution))










def __UpperCamelCase			(       _A = 1000000  ):
						lowerCAmelCase_      			=  1
						lowerCAmelCase_      			=  1
						lowerCAmelCase_      			=  {1: 1}

						for inputa in range(2 ,  _A  ):
												lowerCAmelCase_      			=  0
												lowerCAmelCase_      			=  inputa

												while True:
																		if number in counters:
																								counter += counters[number]
																								break
																		if number % 2 == 0:
																								number //= 2
																								counter += 1
																		else:
																								lowerCAmelCase_      			=  (3 * number) + 1
																								counter += 1

												if inputa not in counters:
																		lowerCAmelCase_      			=  counter

												if counter > pre_counter:
																		lowerCAmelCase_      			=  inputa
																		lowerCAmelCase_      			=  counter
						return largest_number


if __name__ == "__main__":
						print(solution(int(input().strip())))




