import java.util.* ;
import java.lang.* ;
import java.io.* ;
class Main {
public static void main
( String [ ] args
) { var n = 0 ; var i = 0 ; var s = 0 ;
System .
out .
println ( "Please enter value for N" ) ; Scanner in
= new Scanner
( System .
in ) ; n = in.nextInt ( ) ;
in.close ( ) ;
s = 0 ;
for ( i = 1 ; i <= n; i += 1 )
{
if ( i % 2 == 0 )
{
s = s + i;
( "Current value i=" + i + " S=" + s) ;
}
}
System .
out .
println ( "Final result sum is S=" + s
) ; }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICAgICAgdmFyIG4gPSAwOyB2YXIgaSA9IDA7IHZhciBzID0gMDsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIlBsZWFzZSBlbnRlciB2YWx1ZSBmb3IgTiIpOwogICAgICAgIFNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIG4gPSBpbi5uZXh0SW50KCk7CiAgICAgICAgaW4uY2xvc2UoKTsKICAgICAgICBzID0gMDsKICAgICAgICBmb3IgKGkgPSAxOyBpIDw9IG47IGkgKz0gMSkgCnsKICAgICAgICAgICAgaWYgKGkgJSAyID09IDApIAp7CiAgICAgICAgICAgICAgICBzID0gcyArIGk7CiAgICAgICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4KKCJDdXJyZW50IHZhbHVlIGk9IiArIGkgKyAiIFM9IiArIHMpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiRmluYWwgcmVzdWx0IHN1bSBpcyBTPSIgKyBzKTsKICAgIH0KfQ==