s=input();a=s.count;prin(f'{a("^*")} {a("*^")}')