read while read A B do let Z+=A $A=$B done echo $Z