#!/usr/bin/perl -w

use v5.36;
use strict;
use experimental 'multidimensional';
use List::Util qw(sum);

local $/  = "\n\n";

chomp (my @elves = <>);
my $max = 0;

for my $elf (@elves) {
	my $s = sum split(/\n/, $elf);
	$max = $s if $max < $s;
}

say $max;

