





import enum
import shutil
import sys


_A :   Tuple								=  shutil.get_terminal_size()

_A :   Union[str, Any]								=  {'UP': 'A', 'DOWN': 'B', 'RIGHT': 'C', 'LEFT': 'D'}


class        __SCREAMING_SNAKE_CASE      (			enum.Enum ):
       _UpperCAmelCase				:  Tuple			   =   0
       _UpperCAmelCase				:  Union[str, Any]			   =   1



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase=""					)    ->    int:







   """simple docstring"""
   sys.stdout.write(str(UpperCAmelCase					) + end					)
   sys.stdout.flush()



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase      ,  UpperCAmelCase=""					)    ->    Union[str, Any]:







   """simple docstring"""
   forceWrite(f"\u001b[{color}m{content}\u001b[0m"      ,  UpperCAmelCase					)



def 	_a						(   )    ->    Dict:







   """simple docstring"""
   forceWrite('''\r'''					)



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    Optional[Any]:







   """simple docstring"""
   forceWrite(f"\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"					)



def 	_a						(   )    ->    Optional[int]:







   """simple docstring"""
   forceWrite(''' ''' * TERMINAL_WIDTH					)
   reset_cursor()




def 	_a						(   )    ->    str:







   """simple docstring"""
   reset_cursor()
   forceWrite('''-''' * TERMINAL_WIDTH					)










import math
import random



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase = False					)    ->    float:







   """simple docstring"""
   if deriv:
      return value * (1 - value)
   return 1 / (1 + math.exp(-value					))


# Initial Value
_A :   Tuple  			=  0.02



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    float:







   """simple docstring"""
   lowerCamelCase__       :						List[Any]        =							float(2 * (random.randint(1      ,  100					)) - 1					)

   for _ in range(UpperCAmelCase					):
      # Forward propagation
      lowerCamelCase__       :						Optional[int]        =							sigmoid_function(INITIAL_VALUE * weight					)
      # How much did we miss?
      lowerCamelCase__       :						int        =							(expected / 100) - layer_a
      # Error delta
      lowerCamelCase__       :						Union[str, Any]        =							layer_1_error * sigmoid_function(UpperCAmelCase      ,  UpperCAmelCase					)
      # Update weight
      weight += INITIAL_VALUE * layer_1_delta

   return layer_a * 100


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       _A :   Union[str, Any]  			=  int(input('Expected value: '))
       _A :   int  			=  int(input('Number of propagations: '))
       print(forward_propagation(expected, number_propagations))



