$d=<>+~0;($\,$d)=map$\+$_+($-=$d+$_-$\),glob for<>;print