       implicit real*8 (a-h, o-z)
       dimension x(3000000),y(3000000),z(3000000)
       character mozi*20
       read*, mozi
       read*, nset
       do i=1,nset
        read*, x(i),y(i),z(i)
       end do
!
       i=0
       do
       i=i+1
       read'(a1)',mozi
       if(mozi=='#') then
               nyou=i-1
               exit
       end if
       end do
       open(7,file='yousosuu.txt')
       write(7,*) nyou
       close(7)
       end
