From that list of commands, none of them can add up numbers, so I suppose the idea is that the shell's arithmetic expansions have to be used.
echo "$(($(LC_ALL=C ls -nq | tr -s ' ' | cut -d ' ' -f5 | tail -n +2 | tr '\n' +)0))"
(here assuming none of the files are devices files for which the
ls -l output doesn't have the size in 5th column but the device major number).
Note that the output of
ls -l or
ls -n varies between locales and is unspecified in locales other than
-q, it wouldn't work for files whose name or symlink target contains newline characters.
-q would amount to an arbitrary command injection vulnerability would you run the command in a directory where someone could create files with malicious names (try for instance after running
ln -s $'\nx x x x a[$(reboot)0]' x without the
-n instead of
-l as with
-l you get user/group names instead of ids which may contain space characters.
tail +2 is deprecated. The standard syntax is
tail -n +2.