'''simple docstring'''

def       __UpperCamelCase	(       UpperCAmelCase					):
 lowercase__    :   Tuple						= len(UpperCAmelCase					)
 lowercase__    :   Optional[int]						= len(matrix[0]					)
 lowercase__    :   Dict						= min(UpperCAmelCase		,					UpperCAmelCase					)

 for row in range(UpperCAmelCase					):
  # 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		,					UpperCAmelCase					):
    lowercase__    :   Union[str, Any]						= matrix[col][row] / matrix[row][row]
    for i in range(UpperCAmelCase		,					UpperCAmelCase					):
     matrix[col][i] -= multiplier * matrix[row][i]
  else:
   # Find a non-zero diagonal element to swap rows
   lowercase__    :   List[str]						= True
   for i in range(row + 1		,					UpperCAmelCase					):
    if matrix[i][row] != 0:
     lowercase__			,							lowercase__    :   Tuple						= matrix[i], matrix[row]
     lowercase__    :   Optional[Any]						= False
     break
   if reduce:
    rank -= 1
    for i in range(UpperCAmelCase					):
     lowercase__    :   Optional[Any]						= 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()


'''simple docstring'''

def       __UpperCamelCase	(       ):
 lowercase__    :   Any						= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

 lowercase__    :   Any						= 6
 lowercase__    :   Optional[Any]						= 1
 lowercase__    :   int						= 1901

 lowercase__    :   List[str]						= 0

 while year < 2001:
  day += 7

  if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
   if day > days_per_month[month - 1] and month != 2:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]
   elif day > 29 and month == 2:
    month += 1
    lowercase__    :   Any						= day - 29
  else:
   if day > days_per_month[month - 1]:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]

  if month > 12:
   year += 1
   lowercase__    :   Dict						= 1

  if year < 2001 and day == 1:
   sundays += 1
 return sundays


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

