calc all input position.