while(1>0)println((readLine split" "map{_.toInt-1}product)-1)