> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/a/a_b.md).

# A B

Works with both positive and negative integers.

```ruby
say STDIN.readline.words.map{.to_i}.sum
```

More idiomatically:

```ruby
say read(String).words»to_i()»«+»
```

Explicit summation:

```ruby
var (a, b) = read(String).words.map{.to_i}...
say a+b
```
