var c = false; var a = +prompt('','') if( (a+1) == 1 ) { a = 10; c = true; } else a = 10; if(c) { alert('магадан') } else alert(a)