s=input();a=s.count;print('{} {}'.format(a("^*"),a("*^")))