





'''simple docstring'''







from math import sqrt






def  _lowerCamelCase				( lowercase						:      int						)	->	int:
				_a								= 0
				for i in range(1    ,							int(sqrt(lowercase						) + 1						)						):
								if n % i == 0 and i != sqrt(lowercase						):
												total += i + n // i
								elif i == sqrt(lowercase						):
												total += i
				return total - n






def  _lowerCamelCase				( lowercase						:      int = 1_0000						)	->	int:
				_a								= sum(
				    i
				    for i in range(1    ,							lowercase						)
				    if sum_of_divisors(sum_of_divisors(lowercase						)						) == i and sum_of_divisors(lowercase						) != i						)
				return total


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

"""simple docstring"""







from __future__ import annotations

__SCREAMING_SNAKE_CASE    	=[]



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



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list[list[int]]     ,			__SCREAMING_SNAKE_CASE							:     int      ):
     if row >= len(__SCREAMING_SNAKE_CASE      ):
          solution.append(__SCREAMING_SNAKE_CASE      )
          printboard(__SCREAMING_SNAKE_CASE      )
          print()
          return True
     for i in range(len(__SCREAMING_SNAKE_CASE      )      ):
          if is_safe(__SCREAMING_SNAKE_CASE     ,			__SCREAMING_SNAKE_CASE     ,			__SCREAMING_SNAKE_CASE      ):
               lowercase_	:				int													=	1
               solve(__SCREAMING_SNAKE_CASE     ,			row + 1      )
               lowercase_	:				Dict													=	0
     return False



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list[list[int]]      ):
     for i in range(len(__SCREAMING_SNAKE_CASE      )      ):
          for j in range(len(__SCREAMING_SNAKE_CASE      )      ):
               if board[i][j] == 1:
                    print('Q'     ,			end=' '      )
               else:
                    print('.'     ,			end=' '      )
          print()


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







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

