program image;
type
 CommandString=string[127];
var
 output,input:file of byte;
 buffer:CommandString;
 CL:CommandString absolute cseg:$80;
 a,b,outbyte:byte;
begin
 buffer := CL;
 delete(buffer,1,1);
 assign(input, buffer + '.wav' );
 assign(output, buffer + '.bin' );
 reset( input );
 rewrite( output );
 for a:=1 to 60 do read(input, a);
 while( not eof( input ) ) do
  begin
   read(input, a );
   read(input, b );
   outbyte := (b-(b mod 16)) + byte((a-(a mod 16)) div 16);
   write( output, outbyte );
  end;
 close(output);
 close(input);
end.