#!/usr/bin/perl -w

use v5.16;
use strict;

$/ = undef;
$_ = <>;

my $sum;
while (/-?\d+/g) {
	$sum += $&;
}
say $sum;
