my $start = ( $opt_s ) ? $ARGV[0] : $ARGV[0] + 1; my $end = $ARGV[1]; print( ($end - $start + 1) * ($start + $end) / 2 );