calc pips from stdin