

'''simple docstring'''

def  UpperCamelCase(	):
 UpperCAmelCase			:      str		   =					1

 while True:
  if (
      sorted(str(UpperCAmelCase_      )      )
      == sorted(str(2 * i      )      )
      == sorted(str(3 * i      )      )
      == sorted(str(4 * i      )      )
      == sorted(str(5 * i      )      )
      == sorted(str(6 * i      )      )
  ):
   return i

  i += 1


if __name__ == "__main__":
 print(solution())







'''simple docstring'''

def  UpperCamelCase(	UpperCAmelCase_ = 1_00      ):
 UpperCAmelCase			:      Optional[Any]		   =					[[0 for _ in range(UpperCAmelCase_      )] for _ in range(m + 1      )]
 for i in range(m + 1      ):
  UpperCAmelCase			:      Optional[int]		   =					1

 for n in range(m + 1      ):
  for k in range(1    ,			UpperCAmelCase_      ):
   memo[n][k] += memo[n][k - 1]
   if n > k:
    memo[n][k] += memo[n - k - 1][k]

 return memo[m][m - 1] - 1


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




