



def       lowercase       (   SCREAMING_SNAKE_CASE__       :	Union[str, Any]				)  ->     Tuple:
	_snake_case    :  List[Any]					=					len(__A				)
	_snake_case    :  List[str]					=					len(matrix[0]				)
	_snake_case    :  Optional[Any]					=					min(__A				,       __A				)

	for row in range(__A				):
		# Check if diagonal element is not zero
		if matrix[row][row] != 0:
			# Eliminate all the elements below the diagonal
			for col in range(row + 1				,       __A				):
				_snake_case    :  Optional[Any]					=					matrix[col][row] / matrix[row][row]
				for i in range(__A				,       __A				):
					matrix[col][i] -= multiplier * matrix[row][i]
		else:
			# Find a non-zero diagonal element to swap rows
			_snake_case    :  Tuple					=					True
			for i in range(row + 1				,       __A				):
				if matrix[i][row] != 0:
					_snake_case	,    _snake_case    :  Union[str, Any]					=					matrix[i], matrix[row]
					_snake_case    :  Dict					=					False
					break
			if reduce:
				rank -= 1
				for i in range(__A				):
					_snake_case    :  Dict					=					matrix[i][rank]

					  # Reduce the row pointer by one to stay on the same row
			row -= 1

	return rank


if __name__ == "__main__":
		import doctest

		doctest.testmod()





def       lowercase       (   SCREAMING_SNAKE_CASE__       :	int = 1_000				)  ->     int:
 _snake_case	,    _snake_case    :  str					=					1, 1
 _snake_case    :  List[Any]					=					2
 while True:
  _snake_case    :  Union[str, Any]					=					0
  _snake_case    :  int					=					fa + fa
  _snake_case	,    _snake_case    :  Union[str, Any]					=					fa, f
  index += 1
  for _ in str(SCREAMING_SNAKE_CASE__				):
   i += 1
  if i == n:
   break
 return index


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