function out = total(c)
out = 0;
for j = 1:length(c)
    if isnumeric(c{j})
        out = out + c{j};
    else
        out = out + total(c{j});
    end;
end;