

import itertools
import string
from collections.abc import Generator, Iterable


def 							__lowerCAmelCase     (							_UpperCamelCase		:	Iterable[str]		,				_UpperCamelCase		:	int						)		->				Generator[tuple[str, ...], None, None]:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      iter(_UpperCamelCase						)
 while True:
  SCREAMING_SNAKE_CASE		    =      tuple(itertools.islice(_UpperCamelCase		,				_UpperCamelCase						)						)
  if not chunk:
   return
  yield chunk


def 							__lowerCAmelCase     (							_UpperCamelCase		:	str						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      ''.join([c.upper() for c in dirty if c in string.ascii_letters]						)
 SCREAMING_SNAKE_CASE		    =      ''

 if len(_UpperCamelCase						) < 2:
  return dirty

 for i in range(len(_UpperCamelCase						) - 1						):
  clean += dirty[i]

  if dirty[i] == dirty[i + 1]:
   clean += "X"

 clean += dirty[-1]

 if len(_UpperCamelCase						) & 1:
  clean += "X"

 return clean


def 							__lowerCAmelCase     (							_UpperCamelCase		:	str						)		->				list[str]:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      'ABCDEFGHIKLMNOPQRSTUVWXYZ'
 # we're using a list instead of a '2d' array because it makes the math
 # for setting up the table and doing the actual encoding/decoding simpler
 SCREAMING_SNAKE_CASE		    =      []

 # copy key chars into the table if they are in `alphabet` ignoring duplicates
 for char in key.upper():
  if char not in table and char in alphabet:
   table.append(_UpperCamelCase						)

    # fill the rest of the table in with the remaining alphabet chars
 for char in alphabet:
  if char not in table:
   table.append(_UpperCamelCase						)

 return table


def 							__lowerCAmelCase     (							_UpperCamelCase		:	str		,				_UpperCamelCase		:	str						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      generate_table(_UpperCamelCase						)
 SCREAMING_SNAKE_CASE		    =      prepare_input(_UpperCamelCase						)
 SCREAMING_SNAKE_CASE		    =      ''

 # https://en.wikipedia.org/wiki/Playfair_cipher#Description
 for chara, chara in chunker(_UpperCamelCase		,				2						):
  SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE		    =      divmod(table.index(_UpperCamelCase						)		,				5						)
  SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE		    =      divmod(table.index(_UpperCamelCase						)		,				5						)

  if rowa == rowa:
   ciphertext += table[rowa * 5 + (cola + 1) % 5]
   ciphertext += table[rowa * 5 + (cola + 1) % 5]
  elif cola == cola:
   ciphertext += table[((rowa + 1) % 5) * 5 + cola]
   ciphertext += table[((rowa + 1) % 5) * 5 + cola]
  else:  # rectangle
   ciphertext += table[rowa * 5 + cola]
   ciphertext += table[rowa * 5 + cola]

 return ciphertext




def 							__lowerCAmelCase     (							_UpperCamelCase		:	str		,				_UpperCamelCase		:	str						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      generate_table(_UpperCamelCase						)
 SCREAMING_SNAKE_CASE		    =      ''

 # https://en.wikipedia.org/wiki/Playfair_cipher#Description
 for chara, chara in chunker(_UpperCamelCase		,				2						):
  SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE		    =      divmod(table.index(_UpperCamelCase						)		,				5						)
  SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE		    =      divmod(table.index(_UpperCamelCase						)		,				5						)

  if rowa == rowa:
   plaintext += table[rowa * 5 + (cola - 1) % 5]
   plaintext += table[rowa * 5 + (cola - 1) % 5]
  elif cola == cola:
   plaintext += table[((rowa - 1) % 5) * 5 + cola]
   plaintext += table[((rowa - 1) % 5) * 5 + cola]
  else:  # rectangle
   plaintext += table[rowa * 5 + cola]
   plaintext += table[rowa * 5 + cola]

 return plaintext




def 							__lowerCAmelCase     (							_UpperCamelCase		:	List[str]=2_81_23						)		->				str:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      [1] * (limit + 1)

 for i in range(2		,				int(limit**0.5						) + 1						):
  sum_divs[i * i] += i
  for k in range(i + 1		,				limit // i + 1						):
   sum_divs[k * i] += k + i

 SCREAMING_SNAKE_CASE		    =      set()
 SCREAMING_SNAKE_CASE		    =      0

 for n in range(1		,				limit + 1						):
  if sum_divs[n] > n:
   abundants.add(_UpperCamelCase						)

  if not any((n - a in abundants) for a in abundants						):
   res += n

 return res


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

