Simple math model of nervous system