<>=~/(.{1,10})(?{++$$1})^/;chop,$\+=$$_ for<>;print