Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 16 of 16

Thread: Multiple Audio outputs

  1. #1
    Senior Member
    Join Date
    May 2013
    Posts
    130

    Multiple Audio outputs

    Hi guys,

    I'm working on a medical simulation project that is working out very well to this point, but is now and then really stretching the limits of my 'zone of proximal development' (see the ZPD learning theory by Vygotsky if you don't understand ).

    I want to be able to play about 6 different sounds to say 6 different tiny speakers. They will need to be picked up by a stethoscope so I don't need to amplify them very much. The controlling should be done by either a i2c signal or a serial message (preferably the first).

    Any suggestions or ideas?

    I already looked at this neat Teensy addition: http://forum.pjrc.com/threads/24793-Audio-Library
    Will probably be a good start.

    Johan
    Last edited by jakorten; 02-03-2014 at 06:23 AM.

  2. #2
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    If the sounds just need to be tones, then simply put a speaker on the PWM outputs with a frequency of about 1khz. A duty cycle of 0 will shut the speaker up... And somewhere around 50% will make some noise

  3. #3
    Senior Member
    Join Date
    May 2013
    Posts
    130
    Quote Originally Posted by bloodline View Post
    If the sounds just need to be tones, then simply put a speaker on the PWM outputs with a frequency of about 1khz. A duty cycle of 0 will shut the speaker up... And somewhere around 50% will make some noise
    Of course, but that is not the case, the original sounds are WAV or MP3 files, I don't think PWM sound is suitable for even the heart beat.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,556
    Currently the audio library can output 4 simultaneous signals: stereo I2S to the audio shield, mono to the 12 bit DAC, and mono to PWM.

    Maybe I ought to add an 8 channel PWM output object?


    Quote Originally Posted by jopiek View Post
    I don't think PWM sound is suitable for even the heart beat.
    You might be surprised by the 9 bit 88 kHz PWM signal. Obviously it's not as good as the 12 bit DAC, which isn't as good as the 16 bit audio shield. But when heard through an amp that doesn't mind the 88 kHz carrier (which is difficult to fully filter away), it actually sounds pretty reasonable. The trick is using a filter that attenuates the 88 kHz without messing the audio up too much, and using an amplifier that doesn't do horrible things if fed some of the 88 kHz.

  5. #5
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Paul beat me to it, but you can output samples by varying the PWM output duty at a high frequency. I used to do this on the Atmega328 to output audio, the cheap speaker I used acted as a low pass filter. The quality of 11khz 8bit samples was better than some far more expensive DACs I had wasted money on!!

    Remember to keep for sample data in Flash, or you will burn up RAM :-/
    Last edited by bloodline; 02-03-2014 at 04:05 PM.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,556
    I was actually thinking of adding an 8 channel output object, just to see if I could do it....

    The audio library processes all streams as 16 bits at 44.1 kHz. The PWM output is 2X oversampled, which makes filtering away the carrier a bit easier. Currently there's no dithering, but I might add that for a modest resolution boost at lower frequencies.

    On Teensy 3, all you have to do is declare your array with "const" and it automatically goes into the flash memory without consuming any RAM. There's no need to use PROGMEM as on AVR, and best of all, you can access the data as an ordinary C array. There's no need for pgm_read_byte().

  7. #7
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Quote Originally Posted by PaulStoffregen View Post
    I was actually thinking of adding an 8 channel output object, just to see if I could do it....

    The audio library processes all streams as 16 bits at 44.1 kHz. The PWM output is 2X oversampled, which makes filtering away the carrier a bit easier. Currently there's no dithering, but I might add that for a modest resolution boost at lower frequencies.

    On Teensy 3, all you have to do is declare your array with "const" and it automatically goes into the flash memory without consuming any RAM. There's no need to use PROGMEM as on AVR, and best of all, you can access the data as an ordinary C array. There's no need for pgm_read_byte().
    +1 on all of this please

  8. #8
    Senior Member
    Join Date
    May 2013
    Posts
    130
    Quote Originally Posted by bloodline View Post
    +1 on all of this please
    Very interesting! I learn so much from this project, my students too, but the thing is, we attack real problems and that makes it very interesting.
    When we have come further with the project (the other parts), I will share more details, we want to release our simulator in the end as open source project, not sure if the large simulation companies will be a happy about that (Two Teensies and one custom Arduino [atmega328] will be in the project, but now maybe an extra Teensy for the audio then.

    So basically, I just need to get some good samples (http://www.capnobase.org and http://www.physionet.org etc) and start testing the sounds I guess (while I wait on our OSH circuit boards )

    Probably already know, but look: http://www.mit.edu/~gari/CODE/ECG_la...ct_18_2013.pdf
    Last edited by jakorten; 02-03-2014 at 07:27 PM.

  9. #9
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    I made a quick sketch last night to play 8bit 15626Hz audio via pin 3 PWM... I have tested it and you can use all the PWM pins at the same time. Works a treat:

    Code:
    /*
    "Ergonomically Terrific"
     */
     
    elapsedMicros microTime;
    
    //********************************************
    const char ergo[]={128,128,128,128,128,122,116,104,108,107,112,134,122,139,144,133,152,141,129,152,142,141,159,149,156,164,139,148,135,117,124,105,91,95,92,76,105,98,114,124,105,132,131,135,133,152,143,164,158,154,164,138,143,125,127,114,112,111,112,120,105,109,106,114,114,117,129,130,145,146,154,156,151,145,143,143,127,126,115,119,117,108,113,110,114,111,117,115,120,125,126,139,138,145,146,148,148,142,140,132,133,127,122,117,111,113,108,110,106,111,113,115,114,113,122,134,139,132,142,150,152,148,136,135,137,134,130,131,124,120,127,120,120,110,112,124,132,125,128,138,147,158,145,150,154,158,156,164,150,137,122,128,102,72,95,101,110,100,100,120,125,105,112,127,134,147,154,168,169,162,165,162,150,126,119,126,121,114,105,106,111,106,95,103,101,108,122,126,141,144,149,156,156,152,145,137,134,136,127,123,123,119,119,109,106,100,101,106,109,118,123,131,139,150,149,147,142,142,141,128,113,113,112,117,114,107,110,120,116,116,118,116,128,134,141,143,141,146,152,146,139,130,136,137,132,125,126,120,130,124,117,128,115,142,142,143,150,158,164,159,125,77,106,128,108,109,92,141,160,120,101,108,113,125,137,125,146,144,164,181,154,129,114,132,141,121,106,115,129,136,116,98,101,98,113,122,119,128,137,154,165,150,129,133,141,140,130,116,127,137,132,126,116,108,107,111,107,105,108,115,136,136,121,118,114,127,132,133,132,143,151,146,139,127,127,128,138,133,124,128,123,146,123,123,118,131,138,131,128,133,154,132,150,140,140,154,149,164,170,149,169,111,73,79,108,88,83,86,120,162,98,98,103,126,124,144,139,164,168,172,208,166,144,122,137,140,115,95,109,125,125,100,85,89,90,101,118,122,126,145,134,164,156,135,146,147,160,140,114,110,134,128,122,114,113,106,103,90,90,87,93,132,148,158,145,150,164,168,141,117,123,136,139,135,131,130,132,133,117,108,91,107,130,123,128,115,150,150,141,135,138,159,156,149,148,156,165,159,164,170,128,48,65,109,86,75,40,145,156,132,83,113,132,119,141,129,164,148,189,197,185,136,110,132,140,120,77,92,107,147,128,95,97,86,132,122,113,120,135,184,180,162,117,132,137,138,136,97,105,133,146,117,106,92,106,112,105,124,117,127,152,147,150,132,134,139,146,136,123,150,129,151,126,127,125,90,117,103,117,101,123,140,147,158,128,154,154,151,158,143,159,164,162,177,193,180,158,39,44,88,40,75,39,141,156,134,102,110,99,106,134,131,176,131,214,208,206,149,102,142,142,97,74,95,102,148,97,87,100,82,111,91,95,117,141,140,150,142,135,146,140,159,124,114,133,151,131,117,134,113,114,88,107,106,116,132,135,145,135,146,146,143,142,138,138,172,131,140,129,125,109,102,95,110,125,117,136,128,144,127,133,126,154,154,156,190,182,197,200,141,97,47,65,60,66,58,86,143,136,92,80,89,87,130,114,150,156,164,211,197,149,131,133,149,152,95,113,130,148,122,95,82,93,83,90,106,100,110,137,164,152,135,131,165,160,139,134,130,142,137,111,100,108,123,127,120,119,119,119,113,129,113,122,126,152,148,148,152,154,148,113,117,116,119,118,112,122,137,126,124,152,121,149,143,145,174,152,158,196,194,204,174,110,74,91,49,73,68,53,118,118,125,100,83,80,133,110,133,136,158,202,182,173,150,148,133,158,126,129,119,133,152,116,104,83,97,98,97,88,100,114,129,150,126,148,165,145,150,145,141,119,113,128,130,114,131,148,138,135,120,106,119,91,135,103,125,119,135,139,142,125,135,140,135,129,107,144,134,124,119,132,127,150,92,148,166,158,141,165,191,197,195,149,195,74,80,73,98,46,85,94,120,148,49,85,83,116,91,117,116,164,180,158,197,136,156,142,152,135,134,128,123,174,104,118,95,115,115,101,93,85,111,110,132,102,121,152,150,166,139,123,117,136,141,126,136,132,162,156,148,122,103,116,114,123,102,114,136,154,145,122,125,115,138,140,110,117,122,118,148,131,130,120,137,142,172,124,190,185,194,211,164,150,95,99,75,84,38,66,97,145,98,110,59,120,108,85,108,112,156,182,182,158,159,130,152,134,126,110,122,144,141,129,111,126,112,113,109,98,101,95,128,134,128,123,123,124,129,117,104,101,131,154,159,156,169,156,152,147,129,100,102,137,151,130,131,132,151,129,91,112,106,105,109,109,130,145,119,152,125,144,137,143,176,170,206,202,214,188,91,88,74,86,43,55,76,141,123,82,99,87,105,68,139,106,184,156,213,213,160,146,132,150,112,122,103,149,135,121,115,104,109,73,112,95,116,113,132,147,116,134,106,138,108,122,97,112,146,145,174,156,185,147,176,140,92,95,100,118,109,137,126,150,150,150,113,95,131,118,140,107,156,147,164,164,140,152,131,162,169,176,169,104,100,91,88,44,56,66,108,122,97,109,67,123,110,146,115,136,156,191,200,149,139,147,154,137,121,97,117,136,102,98,93,95,110,114,116,95,117,117,148,117,126,95,120,150,140,118,112,156,148,145,142,152,176,172,168,124,115,98,118,89,109,103,126,150,143,134,101,112,131,114,75,137,168,180,159,209,206,200,156,185,123,52,78,117,102,75,51,121,127,72,43,67,95,100,113,131,168,144,181,191,196,146,140,162,168,145,117,144,144,137,105,92,89,75,80,95,110,110,95,135,124,89,77,87,136,134,126,154,211,216,182,173,158,158,146,147,139,143,141,139,122,78,68,94,90,105,108,137,124,149,174,131,162,150,176,140,188,197,158,124,148,149,108,84,39,129,81,84,54,94,91,105,89,107,129,104,146,151,180,139,150,177,188,172,132,162,145,144,108,112,113,104,113,101,103,78,95,82,69,52,61,112,145,164,146,173,185,196,166,152,152,156,193,156,152,149,137,127,120,109,88,120,128,129,121,126,110,115,123,117,121,133,189,206,178,116,97,129,123,87,84,116,125,130,93,90,56,89,112,127,94,103,129,164,162,134,133,158,159,152,132,139,150,150,148,137,121,137,114,107,120,104,70,97,133,93,41,62,100,98,104,116,149,188,188,168,182,191,164,168,166,151,146,156,162,138,131,111,131,117,138,105,68,115,140,124,123,152,185,160,44,94,115,77,124,103,136,181,118,98,130,70,81,85,103,139,125,135,195,159,120,120,125,127,126,92,149,156,152,142,124,132,123,84,122,137,109,107,154,143,95,69,81,94,102,76,95,182,188,152,154,190,144,141,154,133,133,144,147,168,162,126,137,182,190,130,94,138,168,152,152,159,95,42,44,95,75,46,52,158,144,115,66,117,115,110,112,114,143,150,176,200,192,119,154,158,156,109,59,131,154,144,114,104,110,118,92,73,86,72,105,128,117,83,69,120,141,131,110,139,193,216,188,169,173,180,177,152,141,130,115,152,160,129,125,132,164,201,140,129,129,185,172,107,39,67,88,48,53,39,119,118,123,76,114,55,105,147,138,121,118,158,216,173,115,116,151,169,142,104,124,112,156,142,118,107,127,129,150,126,85,75,116,91,41,45,80,105,132,149,168,184,174,177,172,170,146,170,198,194,184,159,140,149,140,143,138,156,203,178,185,182,97,60,38,55,39,39,53,127,106,135,39,98,81,72,112,114,135,181,165,213,177,128,152,150,159,117,79,156,143,130,113,112,119,111,106,137,118,102,105,86,94,78,73,108,133,133,122,154,184,159,164,190,196,180,176,152,182,164,116,136,154,123,140,172,185,181,168,170,44,62,85,66,77,39,93,172,72,54,76,40,101,61,118,160,102,173,195,208,143,95,159,182,145,131,124,164,137,88,118,101,78,104,125,135,111,92,108,104,62,63,86,100,103,124,150,148,140,151,210,206,184,188,189,198,190,156,177,202,147,160,212,173,158,180,102,39,45,92,72,39,46,95,98,54,39,54,67,75,112,129,166,162,172,210,158,143,160,184,211,165,146,184,160,123,97,77,74,99,104,101,111,101,93,91,74,56,81,108,111,125,140,176,152,134,164,190,178,184,210,206,190,189,188,176,176,168,195,209,188,168,104,44,56,81,39,39,39,92,112,39,39,39,58,77,104,119,123,133,194,203,135,119,123,195,214,158,150,189,197,147,133,80,81,111,108,121,137,86,95,106,73,38,52,84,105,136,128,130,136,128,140,165,159,166,213,216,214,204,184,200,188,210,210,208,212,198,66,56,105,53,38,38,49,95,40,39,42,44,39,70,71,121,117,125,189,184,136,117,185,203,182,182,191,210,193,162,132,129,102,94,131,135,110,101,102,98,65,39,65,73,70,103,114,134,123,123,148,164,154,174,200,203,211,193,203,216,185,212,212,213,188,147,52,113,126,53,48,95,69,67,39,38,39,39,39,93,85,73,129,182,160,122,113,138,176,182,165,211,211,188,202,170,133,98,127,156,123,127,131,114,109,61,39,60,54,60,81,118,121,104,126,141,142,142,158,194,211,200,211,209,204,188,184,213,209,202,181,129,112,78,125,71,41,60,78,45,45,39,41,38,40,63,60,84,98,138,138,125,124,133,173,191,166,174,200,197,188,168,152,137,166,156,160,158,133,128,111,66,60,72,53,77,79,95,101,95,88,106,108,111,142,173,196,184,208,209,191,216,203,214,213,174,139,152,95,148,100,73,117,91,60,76,38,41,40,43,60,56,71,78,113,99,92,108,110,141,164,173,188,188,197,206,181,159,160,188,176,169,166,168,154,128,92,94,91,70,77,78,95,98,99,104,112,79,97,129,141,147,158,178,197,191,174,195,213,184,164,184,142,158,141,113,139,118,110,120,93,85,73,55,82,63,76,63,75,91,75,86,74,89,117,108,130,150,141,166,168,168,164,156,164,184,192,162,190,180,151,154,134,90,105,107,92,109,92,95,110,103,92,112,105,109,132,134,137,142,151,164,168,160,148,180,184,168,180,162,138,162,131,115,154,103,117,145,84,97,103,61,88,91,67,91,100,74,92,100,77,101,125,106,122,139,131,143,146,147,156,159,152,166,180,166,148,152,148,134,140,134,117,114,116,102,108,102,88,116,133,118,132,136,122,126,131,128,132,135,136,154,156,138,144,158,141,144,142,126,132,133,134,129,139,126,123,128,122,111,111,107,115,112,103,114,110,114,112,114,111,113,117,125,123,123,126,133,132,138,138,136,138,131,138,142,133,130,140,136,130,129,125,127,124,117,116,118,120,123,130,131,125,121,126,122,122,121,129,137,135,130,133,134,132,133,134,133,139,141,133,137,127,131,137,129,126,128,126,130,124,123,125,123,123,128,125,129,130,131,131,130,125,128,128,124,128,129,127,128,126,125,126,128,124,121,124,121,123,124,121,123,124,127,129,128,128,126,125,128,125,129,129,133,134,132,128,126,124,124,128,125,123,124,126,126,127,120,121,124,123,123,124,125,127,128,128,128,128,130,132,131,135,136,135,137,136,135,132,131,129,132,135,136,134,132,131,132,130,128,127,127,129,131,128,128,124,123,124,126,123,124,127,126,126,123,122,126,125,125,125,127,127,128,129,129,130,130,130,130,128,128,129,130,125,124,125,124,123,124,125,124,124,123,125,124,121,125,128,129,129,128,128,129,129,130,130,129,132,134,134,135,136,138,137,134,134,134,133,132,134,133,134,135,132,132,134,131,132,133,134,132,132,132,133,133,130,128,128,128,127,125,120,122,123,122,120,120,120,120,121,119,121,122,123,126,125,123,126,127,130,130,128,130,131,131,130,131,131,128,129,128,125,126,127,127,125,124,125,125,125,124,123,125,126,126,126,127,127,129,128,128,128,125,128,132,131,130,132,132,134,131,130,130,130,129,132,129,126,124,124,122,121,119,122,125,127,126,126,124,125,125,123,123,125,128,130,129,129,132,128,129,127,128,126,128,130,131,129,126,126,126,122,122,124,123,126,125,123,125,121,122,124,121,124,125,128,129,127,130,133,130,130,128,133,133,136,138,136,135,133,134,132,126,122,121,118,119,116,117,116,118,118,117,119,118,119,120,119,122,123,127,129,130,133,135,135,134,136,137,140,140,146,147,142,139,139,138,136,135,136,137,133,129,129,125,123,122,123,123,125,125,126,126,125,124,127,127,128,128,131,133,135,133,132,131,130,133,132,130,130,132,129,125,125,120,121,122,119,118,120,120,120,117,116,115,118,119,119,123,128,129,129,130,131,133,135,135,135,137,138,134,134,133,132,130,130,127,126,129,129,128,128,126,121,122,123,123,123,125,127,130,128,127,123,126,129,128,129,131,134,132,132,134,135,131,131,131,133,129,132,134,138,133,128,124,127,126,124,126,124,123,123,124,123,126,125,125,122,124,121,125,129,131,133,132,132,131,127,128,127,132,130,131,131,132,133,128,125,126,120,128,125,130,123,126,126,126,123,124,130,125,129,131,128,123,126,129,127,127,126,127,124,126,131,132,137,132,132,132,125,116,131,142,138,144,149,143,121,124,127,124,128,142,151,144,135,124,120,124,128,129,134,136,130,123,129,126,127,124,131,136,133,134,129,124,129,134,127,123,125,124,116,121,120,119,113,122,123,120,123,104,128,117,123,117,136,131,135,139,140,114,78,104,113,142,156,185,150,118,131,101,78,95,148,168,154,156,127,107,102,89,114,137,142,156,152,141,107,102,111,120,133,133,152,136,125,124,118,108,101,111,140,156,127,150,154,145,98,109,111,117,124,168,180,147,141,129,121,115,92,101,124,132,143,145,149,127,131,132,140,116,138,145,129,128,138,123,128,130,139,124,117,112,120,116,117,120,104,103,110,122,140,120,131,137,122,115,119,121,132,149,145,143,136,121,114,117,125,130,129,149,151,138,132,124,108,115,131,121,133,138,132,135,121,122,122,133,142,135,136,126,135,127,140,156,159,154,152,164,144,129,150,139,134,120,129,138,119,134,134,121,112,118,103,114,112,111,120,113,107,115,112,118,116,124,136,132,117,121,131,126,123,133,143,135,132,146,134,132,127,125,123,126,121,130,121,123,114,121,102,97,93,103,107,99,109,120,113,122,122,125,124,123,132,120,129,141,158,150,149,158,150,147,139,149,160,162,168,172,162,168,159,151,142,126,125,114,130,117,113,107,108,101,82,94,98,86,95,111,95,106,110,106,112,123,126,121,139,127,136,137,140,140,133,145,154,146,143,147,146,130,143,144,135,136,135,116,123,106,106,97,103,94,100,89,91,93,93,94,106,104,118,119,131,137,138,146,156,156,165,169,160,180,176,162,160,160,168,174,178,193,180,169,165,140,97,84,164,112,119,111,82,93,69,47,86,90,50,105,93,103,86,84,102,131,115,122,164,124,144,160,172,156,140,152,164,162,160,152,156,150,144,152,137,122,107,132,122,103,86,103,81,94,75,92,82,82,90,100,106,100,90,119,134,125,136,158,152,154,162,172,173,170,180,189,174,160,172,174,185,198,182,189,204,120,140,65,143,107,99,112,71,53,77,17,50,97,15,87,110,75,100,63,110,136,139,119,166,152,151,198,181,185,168,152,176,188,141,165,180,144,166,119,124,107,101,109,140,103,87,89,59,82,56,63,73,99,87,112,95,101,113,103,147,143,134,154,166,172,164,170,165,172,177,185,180,164,162,169,190,170,170,188,168,206,132,79,63,93,156,95,105,92,83,88,46,7,61,69,85,158,72,74,126,119,127,143,138,135,176,160,192,188,137,138,173,162,154,126,124,180,158,145,132,93,83,113,128,120,90,87,93,105,78,63,76,89,116,120,111,87,85,127,150,152,133,150,156,165,162,152,148,154,172,173,173,139,134,152,166,146,152,154,182,191,198,188,176,54,70,82,180,109,82,101,145,78,44,50,23,57,99,142,111,67,68,119,172,114,104,172,188,145,164,164,136,133,145,192,162,95,117,158,168,134,112,113,136,104,114,132,104,89,119,144,95,66,60,108,129,105,112,106,112,108,125,125,133,114,137,180,152,121,122,158,168,156,146,139,147,137,146,148,146,129,156,192,193,180,204,223,223,120,23,71,235,69,132,71,110,117,63,7,57,52,53,130,156,98,48,113,154,165,107,109,204,178,169,136,152,166,133,164,170,120,106,134,168,146,93,104,140,125,95,115,108,122,105,107,98,95,66,99,115,111,113,83,119,132,112,104,110,120,134,148,147,154,141,150,162,156,133,130,154,156,152,131,131,140,136,147,154,156,178,196,194,229,213,180,148,97,35,169,107,103,71,91,118,60,8,7,95,95,109,124,119,89,100,136,144,119,105,196,191,188,119,123,168,150,156,141,138,125,144,150,133,101,103,142,134,126,110,114,117,104,93,78,77,88,107,116,95,78,87,108,111,102,100,125,145,148,136,127,144,154,176,173,156,151,160,164,154,130,126,142,158,142,124,128,136,160,172,136,142,162,178,202,158,141,126,76,94,102,90,107,80,120,121,102,58,56,125,141,144,124,130,140,146,135,125,102,141,156,168,152,105,135,151,142,122,122,132,138,142,130,116,115,131,128,125,105,101,104,120,112,88,91,102,111,114,106,101,110,118,108,110,124,127,133,140,138,135,137,142,152,151,152,148,151,145,132,125,124,123,120,119,124,122,123,124,119,120,130,128,134,132,132,135,142,147,147,154,164,164,162,151,145,156,158,159,164,152,156,154,150,133,132,132,132,125,116,108,110,110,100,98,92,95,98,103,102,102,105,106,104,103,105,102,113,115,114,115,114,119,128,131,135,138,144,147,140,134,130,130,139,143,140,137,132,125,126,122,115,117,129,130,125,119,113,113,117,114,114,115,114,119,122,123,118,118,125,130,131,133,134,140,145,144,145,146,151,156,156,158,160,156,162,158,160,158,158,166,168,150,142,138,133,135,137,131,132,135,128,118,119,110,112,117,110,106,107,106,109,105,98,95,97,108,108,106,112,111,116,126,124,122,129,132,133,138,138,136,140,137,140,136,133,130,131,125,118,113,115,120,120,118,113,111,106,107,110,109,113,114,117,115,116,116,117,124,127,128,134,133,132,134,133,134,136,139,141,142,140,144,138,141,140,140,141,142,141,140,139,140,140,142,141,145,152,154,158,158,143,136,137,144,140,146,140,134,136,125,117,123,121,118,122,115,111,110,110,108,101,102,103,101,106,107,101,108,110,106,108,107,107,112,114,112,116,117,126,126,127,128,130,131,134,135,131,133,131,133,132,134,134,129,127,125,118,117,115,114,117,116,112,112,111,111,109,117,119,122,123,126,123,122,124,125,127,133,135,137,141,141,141,142,141,145,146,148,146,146,150,152,148,147,150,150,151,154,152,156,162,166,164,141,139,138,144,145,147,140,135,137,127,113,122,118,104,119,105,99,105,99,100,93,97,95,95,105,110,103,120,117,115,123,121,120,127,136,134,138,141,141,142,138,134,132,135,134,130,126,131,126,121,124,121,120,116,117,117,110,109,111,110,115,114,113,120,119,121,122,126,124,129,130,131,131,130,133,133,130,131,131,133,136,136,137,139,136,138,139,140,140,143,147,150,147,146,145,145,144,144,148,147,150,152,150,151,154,154,139,135,135,140,130,142,142,131,131,124,111,127,118,113,128,112,109,108,110,107,98,99,99,102,108,111,104,115,114,113,110,111,112,121,123,119,126,126,136,133,133,134,132,133,135,129,129,129,126,129,127,126,128,123,122,121,118,121,121,117,115,115,117,119,120,121,118,121,122,124,123,123,126,125,127,125,123,127,130,130,128,128,133,133,135,136,134,133,135,134,136,136,137,142,141,141,142,143,146,145,143,146,147,154,158,158,158,160,164,159,145,131,131,142,134,145,141,129,135,128,113,112,114,119,118,118,113,108,111,102,102,100,97,102,106,110,109,110,116,114,108,112,112,118,121,123,127,130,133,135,132,130,128,131,131,128,125,125,128,128,123,124,126,124,122,118,120,122,123,125,124,121,123,123,124,122,120,123,127,127,122,121,121,118,117,118,117,119,121,124,124,125,125,128,130,127,125,127,128,131,132,133,133,133,134,136,134,138,141,145,145,145,146,146,147,152,149,151,154,154,154,156,162,160,162,165,158,158,146,135,139,140,135,148,138,128,129,123,118,115,111,115,105,107,103,102,109,97,99,100,94,95,103,107,109,115,119,118,120,119,120,127,128,129,133,140,138,140,139,132,134,130,129,131,128,128,129,131,128,127,126,124,123,118,118,121,120,121,122,119,122,120,121,122,121,119,119,120,121,121,121,119,119,121,121,120,122,124,125,128,130,130,131,129,130,129,129,132,134,137,139,138,138,139,138,140,141,139,140,139,141,143,139,143,144,142,145,139,142,147,143,147,148,148,149,152,156,149,152,154,134,125,128,130,127,129,132,128,120,122,116,103,108,111,112,104,95,107,113,104,97,98,102,102,105,106,104,113,121,123,117,113,114,122,131,130,125,124,134,140,136,128,137,144,142,133,125,128,125,123,117,120,122,128,125,114,116,115,123,105,105,112,121,129,121,122,125,138,133,120,119,121,131,130,127,124,128,133,138,125,126,126,136,139,127,129,126,141,139,136,131,128,136,129,134,124,127,143,145,144,128,137,137,138,130,138,138,156,146,139,147,145,174,134,162,142,159,180,164,168,172,164,149,135,118,133,66,105,77,98,77,78,100,110,107,85,86,107,128,117,123,113,147,137,143,128,121,143,138,140,118,126,130,141,119,115,112,121,122,113,122,117,126,124,131,126,128,121,134,129,132,121,126,128,131,129,128,132,131,136,117,115,112,123,124,122,121,118,126,121,118,113,115,115,105,112,105,114,116,117,120,117,127,136,139,141,140,141,142,140,139,139,145,141,142,137,135,138,134,138,133,140,138,145,139,138,151,149,130,140,138,154,154,128,147,136,137,152,124,158,176,143,177,124,182,152,166,151,123,126,90,86,71,76,88,70,65,117,83,124,78,106,136,121,138,116,141,156,152,141,139,138,150,132,130,127,129,137,127,141,140,151,132,128,136,133,133,111,127,130,144,125,121,125,123,123,100,104,98,119,115,114,113,124,131,123,123,116,130,124,128,127,130,127,121,129,111,117,101,98,106,104,100,97,110,127,124,132,133,137,146,142,134,139,144,146,149,145,141,142,141,129,130,125,125,126,126,131,138,145,140,143,143,136,144,134,133,148,132,137,122,120,120,125,130,149,145,156,158,162,156,149,135,138,124,146,139,94,95,80,86,86,68,84,104,95,105,91,116,127,120,137,130,137,139,146,149,152,140,146,148,147,145,135,149,146,142,121,115,113,114,114,99,113,114,126,120,125,125,128,134,129,127,124,126,122,122,127,129,132,129,128,122,125,120,118,120,121,122,126,123,117,123,110,112,102,104,111,95,114,120,121,125,121,135,136,132,128,136,144,146,144,145,148,146,138,138,133,133,132,136,130,140,134,139,148,149,134,135,132,144,128,123,119,133,152,123,130,133,152,164,136,109,143,152,158,149,134,176,188,159,185,142,122,138,92,92,77,23,95,84,92,77,86,119,118,112,123,121,119,144,120,149,152,151,176,164,160,152,142,135,128,105,112,97,110,115,97,119,117,126,124,117,128,133,128,132,134,134,138,128,128,126,120,115,122,121,117,114,116,119,120,115,114,119,126,119,114,115,119,111,126,101,107,118,116,113,111,117,128,127,128,128,140,150,146,145,152,150,145,144,146,138,144,139,131,140,125,129,132,123,125,130,131,141,143,137,146,159,139,149,150,141,160,130,140,152,134,181,140,184,219,158,185,212,154,149,71,26,93,18,18,17,85,117,95,67,140,152,156,122,100,137,137,138,133,154,169,193,188,176,160,138,140,110,86,59,62,68,97,92,95,120,141,152,131,134,126,142,135,120,112,127,139,132,134,127,148,148,129,116,102,107,100,94,92,101,109,118,111,108,125,131,124,120,122,128,135,115,117,128,122,129,128,131,135,138,141,137,130,132,139,139,139,130,134,152,139,148,136,135,148,127,138,115,131,139,133,139,134,145,162,145,148,162,172,185,160,181,218,232,210,174,142,116,74,48,17,17,29,56,72,57,81,145,176,139,133,123,154,123,109,105,127,172,176,184,169,190,169,160,116,85,72,69,60,61,70,91,145,148,162,151,164,172,156,128,101,116,114,109,94,108,137,156,156,140,143,144,133,94,78,72,74,72,69,89,110,141,156,168,172,176,156,143,128,98,98,102,105,108,122,134,148,165,154,154,154,148,134,115,114,120,126,127,136,140,169,165,149,159,142,160,138,113,137,139,141,154,149,159,216,185,220,235,205,222,105,87,99,17,18,18,40,79,24,49,124,148,176,120,124,169,129,118,95,119,142,158,156,176,185,182,184,149,126,91,65,50,51,31,52,69,113,138,136,159,176,192,174,160,127,130,122,94,80,95,120,130,145,123,143,148,119,88,57,54,60,65,68,93,131,172,182,188,189,184,178,138,97,80,80,73,73,83,106,142,173,177,177,192,182,160,132,111,105,115,114,112,138,156,184,185,173,176,176,168,151,144,126,140,151,166,195,197,234,235,223,200,101,95,77,18,18,19,17,55,19,73,122,176,197,139,148,166,131,130,104,99,131,146,159,176,184,197,203,180,154,107,76,57,36,18,17,41,80,124,127,154,185,203,204,178,147,137,123,94,76,82,102,116,126,124,127,135,124,107,89,81,82,88,91,102,127,152,174,182,174,170,165,143,116,90,79,80,82,93,107,132,168,181,192,195,184,177,159,128,114,107,112,117,128,139,158,180,194,193,190,210,201,198,193,184,200,185,188,140,118,73,74,49,17,19,27,23,18,38,87,115,121,145,156,169,159,152,169,149,150,148,154,137,159,141,140,156,136,118,99,98,84,71,54,55,68,90,90,108,127,142,164,156,144,138,143,125,117,111,113,115,111,106,100,111,107,100,104,112,114,123,128,131,142,140,142,150,146,136,132,127,113,112,107,107,118,130,134,145,152,159,162,165,160,152,154,141,134,139,138,144,154,160,164,185,193,189,226,233,220,201,208,156,130,67,60,70,20,18,28,44,43,54,79,113,122,129,131,137,144,144,151,136,149,151,154,140,159,162,149,154,141,137,128,119,99,103,92,82,75,80,81,93,100,99,118,126,118,120,135,126,123,126,130,130,128,125,125,126,119,110,104,105,104,106,109,114,125,133,132,135,142,138,131,131,119,107,106,98,103,110,113,123,137,148,152,162,168,165,168,158,148,142,140,133,130,130,132,141,151,158,162,173,188,206,209,212,206,209,173,135,95,97,84,63,68,85,98,88,97,102,113,109,104,108,112,99,107,122,117,123,128,133,128,145,137,131,136,141,129,132,132,127,132,127,121,112,115,109,117,110,110,116,126,118,115,125,119,116,125,132,128,132,133,135,130,129,122,116,116,108,107,112,116,121,127,128,130,131,121,115,114,104,94,97,98,103,111,121,128,136,144,149,156,160,158,158,154,151,145,139,136,136,139,140,143,151,156,162,169,180,184,188,192,188,182,168,149,126,105,118,121,108,121,128,123,106,108,116,120,120,117,115,114,100,103,109,98,101,109,99,88,107,107,100,113,125,122,123,125,124,131,125,117,119,123,118,124,128,124,135,137,126,126,136,124,117,129,134,126,127,125,123,125,120,119,125,124,118,124,120,109,112,104,103,111,115,106,114,116,110,109,112,112,112,114,111,114,121,128,129,138,141,144,145,143,146,148,142,137,139,140,137,141,152,154,162,172,172,178,184,180,173,180,170,166,154,134,122,115,128,131,126,138,143,131,117,116,124,119,114,114,104,97,93,104,104,99,105,107,98,98,119,120,117,123,128,124,122,116,118,120,120,125,131,134,132,139,135,132,139,131,121,121,124,116,115,119,122,122,123,120,123,125,124,124,126,126,122,124,119,116,120,113,108,114,115,111,116,122,121,120,118,119,122,123,122,127,129,130,131,131,128,129,130,126,131,138,136,141,145,148,146,150,154,154,158,162,165,168,170,173,178,176,177,184,172,164,152,121,98,117,114,122,112,133,133,117,107,104,111,114,106,106,111,95,105,106,113,112,124,119,116,128,129,127,123,131,127,128,126,129,131,135,128,131,135,128,129,124,118,118,123,103,104,106,105,107,115,121,128,134,125,128,127,125,124,123,119,124,128,125,127,131,134,126,125,113,103,95,95,102,98,105,113,123,129,129,128,128,128,132,135,131,135,134,130,130,137,137,137,139,140,143,146,145,147,146,149,156,158,164,173,180,180,186,188,181,176,170,170,150,98,88,84,92,97,73,104,114,112,102,92,100,97,82,94,95,110,121,126,154,152,164,154,147,152,152,141,137,133,136,128,126,129,125,125,106,106,103,100,103,98,102,113,115,109,106,108,110,105,115,126,136,138,139,143,146,145,138,133,129,128,127,129,137,142,138,133,131,121,99,83,75,73,73,67,83,97,103,108,117,122,120,120,119,129,140,150,150,162,164,159,154,150,148,145,144,149,158,158,154,154,156,152,154,154,145,162,174,152,174,170,165,176,140,152,127,57,71,106,92,95,78,101,103,78,82,81,94,101,110,128,145,143,147,134,160,164,144,144,138,154,154,144,137,137,119,115,109,114,116,111,110,115,125,122,114,104,111,114,114,111,120,121,119,128,134,142,144,137,138,148,147,147,140,138,139,134,129,129,128,124,119,119,123,118,108,100,94,95,93,84,83,86,97,108,109,110,116,118,117,126,135,135,140,154,160,162,154,149,149,148,149,152,152,152,152,151,152,148,146,146,141,152,164,142,149,168,142,154,164,148,164,162,145,143,137,113,87,72,102,141,112,78,95,89,76,70,87,106,113,114,129,140,128,129,123,136,158,154,139,149,158,151,137,137,138,128,114,118,129,126,119,107,104,112,114,107,104,112,115,112,111,117,118,110,118,136,144,142,136,128,135,139,141,143,144,142,136,132,133,131,118,113,116,124,118,109,108,107,103,102,106,107,109,112,115,115,117,121,106,100,115,132,127,120,126,125,128,128,137,137,136,135,144,152,146,141,139,144,147,144,135,138,140,141,145,149,143,136,132,138,149,151,149,147,147,146,148,149,148,138,149,162,162,144,147,124,93,103,116,103,113,117,95,72,82,86,90,93,109,119,119,123,119,128,140,146,149,151,152,145,143,147,152,146,139,137,131,129,128,128,124,120,112,114,111,111,111,116,115,115,114,112,106,110,119,127,131,137,139,135,137,144,143,142,144,140,138,138,136,135,133,132,128,128,124,121,116,114,114,114,113,113,114,114,113,114,119,123,127,132,132,137,134,131,125,130,136,127,128,125,130,127,120,114,115,123,125,123,115,115,120,124,128,133,135,131,134,139,141,136,137,144,149,150,149,152,152,149,148,149,142,135,138,139,142,137,127,121,117,118,137,130,120,127,126,144,145,124,144,152,137,136,151,143,134,115,115,145,148,126,95,115,122,110,109,127,116,104,108,111,121,116,116,120,130,132,123,116,137,147,135,141,149,146,134,139,149,151,140,128,131,135,127,123,124,121,117,108,115,120,117,110,114,120,121,120,117,124,128,125,129,138,136,130,130,135,141,138,136,136,136,135,132,126,122,121,116,114,117,116,108,106,111,115,116,116,118,121,124,127,131,133,133,136,137,140,141,137,135,137,136,126,118,125,131,125,116,113,107,104,110,113,104,94,98,111,117,109,109,116,125,128,132,136,136,137,140,148,152,147,142,150,154,147,141,140,137,133,135,138,138,129,127,132,128,125,117,120,125,118,129,129,123,126,122,128,134,132,132,137,139,144,146,154,151,135,140,154,152,125,97,124,156,142,115,98,106,101,112,125,129,116,90,105,125,124,120,115,129,138,126,129,137,147,140,136,149,144,139,136,143,151,136,125,127,132,134,130,124,123,115,109,115,122,117,104,104,111,118,116,115,122,117,111,121,128,133,128,122,127,132,133,133,136,138,134,132,134,137,131,127,128,130,128,123,121,125,117,108,116,123,116,104,114,125,121,115,115,124,125,122,122,128,128,126,128,139,143,133,135,141,145,142,141,145,144,139,137,141,141,139,133,135,134,131,129,130,131,128,126,128,133,129,125,126,131,133,132,134,135,136,127,135,140,134,125,126,137,149,136,126,132,127,133,132,144,134,112,127,140,136,113,112,136,134,114,108,117,122,105,116,130,121,108,94,121,128,113,115,123,128,123,120,133,136,125,121,131,141,132,128,134,138,133,128,132,138,129,125,129,133,132,125,128,130,125,119,119,128,128,122,125,127,125,118,119,128,127,121,120,123,119,125,127,132,128,116,118,124,140,128,114,110,119,126,128,132,131,121,114,131,138,141,125,125,132,132,129,129,138,131,127,128,141,139,130,128,135,137,128,132,136,136,126,124,132,134,127,126,130,131,124,123,130,130,128,124,128,130,127,125,130,130,128,123,129,132,130,126,127,131,128,124,128,132,127,121,124,128,127,122,119,124,121,112,118,130,134,124,124,128,132,124,126,134,131,126,124,130,131,125,120,129,134,133,127,130,128,122,120,127,132,124,121,123,125,121,118,121,125,124,123,127,131,128,123,126,129,133,128,128,129,128,127,128,134,132,128,127,131,133,130,128,130,129,127,126,129,132,128,125,128,129,126,124,127,128,127,127,128,130,128,125,128,133,131,129,129,130,132,131,129,129,128,128,128,129,129,125,126,127,127,128,128,127,125,124,126,128,129,128,129,131,133,134,133,135,135,132,132,135,134,131,130,130,128,129,127,125,124,124,124,124,123,123,121,123,126,128,127,126,128,130,129,129,129,129,127,126,129,130,128,130,131,130,130,131,130,129,128,126,129,129,130,128,129,129,129,127,127,128,127,128,127,127,126,124,127,129,129,127,127,126,128,128,129,129,128,129,129,131,130,130,130,131,131,132,131,129,128,127,128,129,128,124,123,125,127,127,124,124,124,124,123,125,125,125,126,128,129,129,127,127,128,130,131,129,129,127,127,129,131,130,129,128,128,128,127,127,127,125,124,125,125,124,123,123,124,124,124,123,123,124,125,126,127,128,127,128,129,131,131,130,130,132,133,133,132,130,129,130,132,132,131,128,127,128,130,130,128,128,128,127,128,128,129,128,126,126,128,128,128,127,126,126,127,129,129,128,128,127,129,130,130,130,129,130,130,130,129,129,129,128,126,126,126,124,124,125,125,124,123,123,124,124,125,125,126,125,126,128,128,130,130,131,131,132,131,130,130,132,131,131,130,130,129,128,129,129,128,127,126,126,126,126,127,127,126,127,128,129,129,129,129,130,131,131,131,131,132,131,131,130,130,130,129,128,128,128,126,125,125,126,125,125,124,123,123,125,126,127,128,127,127,129,130,131,131,130,131,131,132,132,131,130,130,131,131,130,129,129,129,129,128,128,127,127,127,126,126,126,126,126,126,127,126,125,126,126,127,127,127,127,126,126,126,126,126,126,127,127,126,126,126,126,127,128,128,128,128,128,128,128,128,129,128,128,128,128,127,130,125,128,128,128,127,130,129,129,128,130,130,129,130,131,130,130,130,130,130,130,130,130,130,130,130,130,130,128,128,128,128,128,128,128,129,128,128,128,128,129,129,129,129,129,129,128,129,131,129,128,128,130,131,130,130,129,128,129,130,129,129,129,129,128,130,129,128,128,128,128,127,128,127,128,128,126,126,126,126,126,126,127,126,126,126,127,127,127,127,127,127,129,128,128,128,128,128,130,128,124,122,126,130,127,126,125,123,123,123,123,125,125,124,124,123,122,123,124,126,126,125,126,127,125,126,127,127,128,128,129,129,128,128,128,128,128,128,127,127,127,126,125,126,126,126,127,127,128,127,126,121,124,128,135,135,136,132,126,122,125,128,132,137,138,133,128,125,124,127,131,134,132,129,128,126,126,127,128,128,130,130,130,130,129,127,127,129,129,130,132,133,131,130,126,126,128,130,133,133,131,128,128,127,128,129,130,130,131,131,129,126,126,129,128,129,127,127,126,127,128,129,130,129,126,128,128,127,129,127,124,126,126,125,127,129,127,126,126,125,125,124,126,125,125,125,125,126,126,128,127,127,129,127,126,129,126,127,129,128,126,127,128,126,126,129,129,125,128,128,129,128,126,126,127,126,126,127,128,127,128,128,127,126,126,126,128,126,126,128,125,126,127,126,126,128,129,130,130,128,127,126,126,125,128,130,128,126,125,126,126,129,129,128,130,129,130,129,129,130,130,129,130,130,130,131,131,130,127,128,130,130,128,129,130,130,127,126,127,129,129,128,128,128,129,129,129,128,129,130,131,131,131,130,128,127,128,129,130,130,129,128,129,128,128,128,129,128,125,126,127,129,133,133,128,123,124,128,126,127,129,123,118,112,84,141,125,152,142,137,113,126,118,150,142,128,146,122,143,120,118,151,148,107,133,125,117,129,136,117,130,116,127,135,131,110,141,125,105,143,128,110,129,123,124,111,135,116,133,139,122,121,127,120,145,131,128,132,125,122,128,132,136,119,138,141,125,103,150,135,122,146,132,110,125,147,122,109,168,134,92,115,156,91,114,128,130,120,109,107,128,115,94,154,99,107,144,124,108,121,132,125,123,119,131,124,126,124,140,98,135,132,121,90,150,125,108,116,151,120,117,122,142,116,113,135,133,112,124,120,105,132,109,149,146,122,141,158,97,143,125,130,139,166,126,136,111,117,124,147,150,138,121,128,121,95,132,152,122,145,115,116,118,112,128,143,149,111,132,120,106,132,154,127,121,143,115,127,128,139,140,123,128,136,122,105,128,129,140,143,115,126,135,109,129,131,134,114,136,116,129,127,132,109,151,140,125,124,131,126,137,132,134,135,124,118,126,118,123,123,128,126,126,124,123,129,129,130,123,141,122,115,135,127,113,116,140,127,132,127,138,131,131,140,120,131,129,117,124,139,112,134,129,126,124,130,115,132,137,129,130,127,127,131,117,139,129,135,128,132,120,131,125,132,136,128,125,131,121,125,129,125,129,122,124,131,128,131,128,134,114,132,130,121,137,126,126,134,119,122,138,123,134,126,132,130,119,133,132,128,121,129,132,129,126,127,131,131,124,131,133,123,129,133,133,122,126,134,130,126,137,132,131,127,129,132,130,124,131,130,125,127,125,131,126,130,126,132,120,133,131,129,129,128,132,125,126,125,130,127,130,131,131,131,127,129,133,125,127,127,134,131,129,128,128,128,127,130,131,127,124,129,128,127,125,126,129,129,126,124,131,126,123,131,127,129,128,126,128,133,125,125,127,129,127,129,129,128,130,124,126,130,124,127,131,126,129,123,123,127,126,128,131,126,126,122,125,130,129,128,124,129,129,123,127,129,128,124,126,127,126,123,123,129,131,126,128,128,124,123,128,130,128,126,124,131,127,120,129,129,126,128,122,127,128,123,130,132,125,119,127,127,127,128,130,129,125,127,129,130,126,125,131,130,130,125,129,128,130,129,129,129,129,126,129,128,126,124,130,132,128,125,125,131,128,125,127,129,128,126,130,130,125,128,129,131,126,125,129,133,124,124,125,124,127,125,128,128,123,125,129,128,127,126,130,131,125,126,129,130,129,127,130,130,126,127,130,130,124,123,128,130,125,124,127,129,125,126,126,129,126,126,128,129,124,127,129,130,125,123,127,129,128,125,128,130,128,129,128,127,128,131,130,129,126,127,132,132,126,127,129,130,130,128,126,127,129,128,129,128,127,129,130,129,128,129,129,130,129,128,126,126,128,131,128,125,127,127,129,130,130,129,126,131,130,130,127,125,128,130,129,127,128,124,128,130,130,123,124,129,130,130,125,124,128,130,130,129,124,124,129,130,130,125,124,129,130,129,128,129,129,129,132,130,127,126,131,134,130,125,129,130,130,126,127,126,128,131,129,129,129,127,129,131,126,128,130,129,128,129,129,130,129,129,130,129,125,128,130,129,129,130,131,128,127,130,130,128,128,132,133,128,126,130,134,132,128,128,130,129,128,128,131,129,127,130,133,128,124,127,130,130,126,125,128,129,128,129,128,125,127,129,129,126,126,129,130,126,126,127,127,126,129,127,125,128,132,133,127,126,127,131,128,125,125,127,127,127,127,126,125,125,131,129,122,123,129,132,126,124,129,131,129,127,128,128,126,127,130,128,124,126,129,128,126,126,126,126,126,128,129,126,126,128,127,125,126,129,126,124,124,129,126,122,125,129,126,122,125,130,126,124,127,132,128,126,128,130,125,124,129,130,126,122,126,130,129,124,128,129,127,126,131,132,127,126,132,133,129,125,128,131,128,123,127,129,128,124,127,128,128,126,130,130,127,127,131,131,128,127,130,130,125,125,129,130,126,125,130,132,129,126,127,131,129,126,127,127,123,124,130,132,123,120,128,133,126,118,122,131,130,123,124,131,129,126,131,135,128,126,133,139,133,124,130,137,133,126,130,134,132,128,130,135,130,127,129,132,128,125,129,132,127,123,127,129,124,123,126,129,126,125,129,132,128,126,131,130,128,130,133,131,129,132,134,130,124,126,133,132,124,122,126,131,129,126,124,122,123,128,128,124,122,126,130,125,123,122,124,124,125,125,124,123,124,128,127,124,124,126,130,129,129,131,131,131,128,129,128,129,132,133,134,129,127,127,129,127,125,127,131,129,127,124,126,126,127,129,129,123,122,127,128,124,119,125,126,126,124,130,134,132,130,133,136,137,136,138,144,140,132,132,135,134,132,132,135,128,118,120,128,125,119,122,130,126,119,115,122,124,120,127,130,126,122,126,130,126,125,130,137,134,128,126,133,134,128,134,137,132,132,132,133,129,123,126,133,131,120,119,125,121,116,120,122,125,120,123,127,124,120,127,138,139,129,127,134,133,133,133,137,136,131,129,128,130,122,128,137,128,123,119,127,127,127,126,127,131,120,121,122,126,125,124,132,130,126,123,124,128,135,134,135,134,133,132,128,134,135,138,136,133,126,125,124,126,133,128,129,124,122,121,118,126,127,126,125,123,125,124,125,125,133,127,122,121,124,126,124,129,132,133,127,124,127,126,123,125,132,130,124,119,122,125,125,127,128,134,127,123,124,127,124,124,130,131,127,126,131,131,128,128,135,137,134,130,127,133,130,130,128,126,127,124,128,125,123,124,130,130,129,127,125,128,132,131,128,128,132,136,134,133,135,136,139,134,130,128,135,131,133,134,133,126,121,125,125,137,135,126,120,124,124,125,130,130,124,128,125,122,121,128,132,133,134,129,129,131,132,126,131,138,136,129,127,125,129,130,126,127,128,124,119,122,126,123,126,122,119,118,122,123,126,128,124,124,125,126,131,132,130,131,134,134,129,124,128,132,136,135,135,129,126,128,132,132,126,122,122,123,123,121,123,121,125,122,120,119,123,128,127,126,123,123,126,127,128,122,130,133,134,137,131,126,131,140,133,129,133,134,130,127,123,129,135,130,121,122,131,127,123,121,124,125,120,128,126,123,122,125,131,131,126,120,127,139,133,132,128,127,130,132,131,125,127,133,132,130,122,125,128,131,131,128,125,122,121,124,127,120,120,115,123,122,117,114,120,134,131,128,122,125,133,139,135,134,128,134,138,139,134,130,134,130,134,134,129,126,120,129,128,131,124,122,126,122,123,120,129,123,118,119,121,126,126,129,127,127,129,129,130,130,133,132,132,136,137,134,137,136,136,133,134,133,132,133,128,128,128,130,134,132,133,122,128,131,140,125,116,120,126,131,118,128,125,123,114,122,133,130,123,126,130,133,131,130,135,135,134,131,132,128,128,137,144,134,126,126,136,134,123,126,122,127,127,124,123,113,113,121,130,125,113,113,120,132,126,124,124,121,127,126,133,127,128,125,137,136,129,131,132,140,134,132,129,131,128,132,137,133,126,120,128,132,125,120,119,120,121,121,122,120,122,120,125,127,123,127,127,132,129,130,132,136,132,137,136,138,134,135,143,137,136,137,130,132,133,139,132,123,133,130,136,120,123,128,130,127,117,129,127,121,119,132,132,129,130,130,140,127,129,132,130,126,123,128,124,117,113,126,128,123,113,118,129,124,122,122,131,129,127,133,137,134,124,130,140,141,133,132,132,133,131,137,139,128,117,122,135,139,123,117,126,127,126,116,127,120,122,123,127,120,109,119,128,136,119,113,119,127,128,128,128,128,125,125,139,133,126,118,129,136,127,127,124,135,121,124,128,130,127,118,127,127,125,119,126,130,127,121,122,125,132,130,129,134,118,121,132,141,138,126,124,131,135,138,138,132,130,131,137,136,136,129,132,144,125,140,132,144,145,138,142,127,124,115,125,136,140,114,95,99,120,123,114,105,99,114,119,125,115,105,115,125,132,122,117,129,137,139,126,127,143,148,150,147,141,140,139,148,156,147,138,130,135,142,141,144,131,130,116,123,127,128,125,111,118,108,114,108,119,114,112,108,111,118,117,127,118,119,116,124,136,132,127,126,123,128,133,135,133,126,126,128,129,129,133,129,130,127,127,132,131,135,134,130,129,133,131,142,132,124,133,130,137,131,131,134,124,129,132,137,127,127,127,137,132,130,125,110,137,132,140,117,117,125,134,149,127,132,108,143,140,136,142,119,138,136,151,132,125,132,145,135,129,129,122,126,121,134,121,118,112,117,129,115,115,108,119,116,113,117,117,116,106,118,124,122,113,116,127,128,125,124,136,136,136,135,139,140,131,140,140,137,126,125,137,132,130,127,133,132,126,124,119,121,114,115,123,118,123,102,109,118,124,118,108,113,114,121,123,128,116,118,115,138,133,126,118,124,139,132,132,133,137,138,135,138,133,131,138,142,138,128,125,137,140,136,124,126,131,130,126,125,128,127,127,127,127,121,121,122,129,125,123,117,123,125,124,132,128,127,128,130,136,137,133,133,131,145,140,132,137,136,144,140,142,141,134,138,149,147,140,135,135,150,139,136,131,127,129,134,136,137,112,106,127,147,132,114,94,116,129,123,115,104,106,105,123,122,111,101,103,125,121,115,104,118,124,125,121,123,128,123,135,137,135,124,130,143,144,141,131,134,136,139,137,135,132,121,126,130,136,124,117,122,125,125,118,120,117,120,115,121,124,121,114,122,127,128,121,122,132,131,130,123,130,126,129,133,136,130,126,135,139,135,130,130,135,135,126,126,129,134,125,124,129,128,127,123,127,124,129,122,128,131,125,129,127,135,128,131,133,142,129,125,133,137,146,132,139,137,138,141,146,144,142,133,140,143,135,144,133,144,135,136,136,134,143,126,133,129,138,131,132,129,121,128,125,132,113,120,120,119,118,109,118,114,116,108,116,112,116,113,118,115,110,115,119,124,117,123,125,132,130,132,134,132,132,127,142,140,136,127,132,137,136,133,130,131,124,124,130,129,121,114,123,122,123,113,118,120,118,121,118,121,113,117,120,123,119,114,124,129,125,125,126,127,128,133,135,133,128,126,139,140,136,127,135,139,139,135,133,132,132,135,144,132,121,124,140,134,123,126,132,132,122,126,125,132,125,127,116,124,129,133,131,125,128,123,139,142,134,126,126,142,127,142,134,134,131,130,144,136,125,132,139,135,133,122,129,130,129,135,127,127,119,124,134,127,116,121,126,126,120,119,120,115,121,123,121,114,117,117,125,122,118,118,120,126,123,123,125,123,123,129,128,129,121,128,126,132,122,129,127,125,130,129,121,124,119,130,127,120,132,112,127,127,122,127,117,124,126,122,126,118,123,122,124,128,134,112,122,146,133,120,120,152,129,113,151,144,117,112,141,138,130,125,131,127,156,122,125,142,143,114,134,139,123,123,132,137,122,140,145,129,121,145,132,137,125,136,123,130,130,129,128,135,127,128,127,118,131,121,128,130,124,133,140,128,136,130,125,130,131,129,129,129,132,128,129,131,132,125,126,129,131,125,128,129,124,127,128,122,123,124,126,124,124,123,122,122,125,122,122,122,122,122,123,123,123,122,125,123,126,125,124,124,125,125,124,127,125,125,124,127,129,127,126,126,126,127,129,129,128,129,130,128,128,129,130,129,129,129,129,129,130,129,128,128,128,127,131,130,126,128,131,127,126,129,129,127,128,129,129,129,129,129,130,132,130,131,132,133,131,132,134,131,131,133,132,133,131,132,132,132,132,131,130,131,131,130,131,130,129,128,130,130,127,127,128,127,127,128,127,125,126,126,126,126,126,127,127,128,127,128,129,129,128,129,132,131,129,130,130,130,130,130,131,130,130,130,129,129,129,129,128,129,127,126,127,128,126,125,126,126,126,126,125,125,125,126,127,125,125,125,126,128,127,126,126,126,126,127,128,128,126,126,127,126,126,126,128,127,126,127,127,127,127,127,126,127,127,127,127,127,127,127,128,128,127,127,128,127,128,129,128,128,128,128,128,127,127,128,128,127,128,128,128,128,129,128,128,128,128,129,128,128,128,129,129,129,128,128,129,128,130,129,129,129,130,129,128,128,129,128,129,128,128,128,128,128,127,128,127,127,128,127,127,128,128,128,127,128,128,127,128,129,128,128,129,129,128,128,129,128,128,129,129,129,128,129,128,129,129,129,130,129,128,129,129,129,128,128,129,129,128,128,128,127,126,128,128,127,126,128,128,126,126,127,126,126,126,126,127,126,126,126,126,126,126,127,126,126,127,128,127,127,128,128,128,128,129,128,128,129,129,128,128,129,129,128,129,129,129,128,129,129,128,128,128,128,129,128,128,128,128,128,128,128,127,127,129,128,128,128,128,128,127,127,128,128,128,128,128,128,128,128,129,128,127,126,129,129,128,128,128,129,128,128,129,128,127,128,129,129,128,129,129,128,128,129,129,128,128,129,129,128,128,129,128,128,128,128,128,128,128,128,128,127,128,128,128,128,128,127,127,128,128,127,126,127,127,127,127,127,127,127,128,128,128,128,127,128,129,128,128,128,128,128,128,128,128,128,128,128,127,127,127,127,127,127,127,127,127,128,127,127,128,128,128,128,128,128,128,129,129,128,128,129,129,129,129,129,129,129,129,130,130,129,129,129,129,129,128,130,129,129,128,128,128,128,128,128,128,128,127,128,127,128,127,128,127,128,128,128,128,128,128,128,128,128,128,128,128,127,128,128,128,128,128,127,127,127,128,128,127,127,128,127,128,128,128,128,127,127,128,127,127,126,127,127,126,126,126,126,127,127,127,126,126,126,126,126,126,126,126,126,126,126,126,126,127,127,126,128,128,127,128,129,128,128,128,128,128,128,129,129,129,129,129,128,128,128,129,129,129,129,128,128,128,129,128,129,128,129,128,128,128,128,128,128,129,129,128,128,129,129,129,129,129,129,129,129,130,130,130,130,130,130,129,130,129,130,129,129,130,129,129,129,128,129,129,129,128,128,128,128,128,128,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,128,128,128,128,129,128,128,128,128,128,128,128,128,128,128,128,129,128,128,127,128,128,128,128,128,127,127,128,127,126,127,127,127,127,126,126,126,126,127,126,126,126,127,127,126,126,126,126,126,126,126,126,126,126,126,127,126,127,127,127,127,127,127,127,126,127,127,127,127,127,127,127,127,127,126,127,126,126,127,127,127,126,127,126,126,126,124,98,141,164,111,94,107,113,182,102,94,144,149,92,126,152,138,115,141,165,116,94,149,151,106,129,128,106,132,144,132,138,139,112,125,152,115,87,176,136,108,92,144,150,93,162,138,131,111,135,150,118,144,133,142,124,129,104,130,120,132,104,117,172,122,85,129,159,103,133,168,135,131,119,126,105,128,172,158,124,134,95,130,114,131,159,158,158,110,118,118,130,121,158,144,146,97,92,122,126,110,152,184,124,98,121,99,111,162,123,104,164,115,103,127,110,180,134,133,135,109,119,140,120,159,132,158,103,102,139,112,152,131,138,135,123,103,135,141,158,139,133,156,61,120,152,123,114,168,120,121,105,140,127,126,127,143,132,110,127,104,138,147,88,158,152,103,111,118,129,131,108,169,117,121,132,107,148,116,136,141,113,140,91,124,148,122,110,162,131,95,128,116,116,118,156,113,141,125,122,120,127,164,108,124,151,116,86,143,123,156,117,136,106,126,111,126,118,149,133,115,113,125,115,104,145,139,103,144,119,117,117,123,130,114,137,131,108,102,129,132,117,127,152,118,114,158,102,120,136,148,130,122,118,130,112,129,128,116,128,150,128,140,133,114,125,147,154,111,118,125,145,108,126,144,114,131,139,139,115,114,115,147,123,129,138,124,147,128,126,128,129,130,127,133,143,121,116,121,146,115,103,147,147,124,125,117,131,123,115,121,154,133,138,91,128,143,118,130,134,134,122,101,113,149,125,131,136,131,121,102,121,146,142,129,123,121,130,113,127,127,148,124,149,123,104,125,123,158,154,132,117,111,132,119,121,150,152,138,129,127,121,110,125,159,164,126,126,118,134,111,121,152,154,137,137,120,112,106,126,147,146,144,125,120,116,135,116,131,152,145,131,117,120,113,120,147,137,121,119,117,120,116,120,120,128,132,121,123,114,110,117,135,130,124,121,121,132,123,119,129,126,134,131,124,118,117,138,127,125,122,128,126,122,120,123,120,129,130,126,119,119,129,128,120,126,129,124,126,122,120,139,129,125,128,133,136,119,133,137,134,131,127,142,135,124,122,152,150,135,117,143,141,131,130,132,140,138,139,136,136,135,128,135,154,141,128,132,136,145,125,117,131,133,138,131,115,115,115,127,124,134,119,122,121,112,115,115,124,128,138,132,120,109,106,117,131,141,132,124,124,126,122,114,121,143,150,137,126,124,119,111,127,142,139,124,119,126,118,105,112,123,136,122,125,117,110,115,126,127,127,130,130,126,118,119,128,127,128,134,136,126,120,126,126,131,136,137,135,124,136,133,126,129,137,136,138,131,126,125,132,137,139,131,130,131,133,136,139,140,141,138,137,138,136,140,143,149,146,141,143,148,136,138,125,128,131,135,139,109,116,115,128,123,106,116,118,127,112,117,119,117,123,112,129,119,117,122,132,134,126,115,120,138,138,136,124,125,137,131,132,123,127,133,134,129,120,111,111,122,129,123,118,116,120,121,108,112,120,129,127,124,123,124,124,125,129,132,126,132,133,134,131,127,129,132,130,126,130,135,134,130,128,129,128,122,131,135,136,129,130,131,131,131,128,137,141,136,134,135,135,135,135,144,151,152,147,148,141,146,148,140,123,139,118,121,152,107,116,116,111,122,102,93,122,129,124,122,115,109,118,113,135,130,118,128,136,136,125,113,122,139,141,138,130,124,129,129,127,124,125,130,126,134,122,114,114,111,119,121,123,122,117,119,121,127,119,123,125,127,132,131,129,127,126,131,134,139,133,129,133,141,136,125,122,128,128,138,129,127,126,124,127,132,130,130,129,137,140,138,131,130,138,146,141,133,139,143,143,145,143,146,148,142,152,139,137,125,120,116,125,125,118,103,111,108,108,102,106,116,128,123,117,118,125,117,121,124,128,137,131,128,129,130,124,131,135,133,127,128,129,133,128,112,120,128,124,122,124,122,115,114,112,116,114,112,121,132,130,119,117,116,129,132,124,129,140,140,134,125,122,126,128,129,139,140,135,128,126,125,124,123,127,131,144,132,129,129,129,130,138,129,145,149,140,150,144,139,135,136,144,149,147,146,138,142,132,132,127,126,125,127,117,119,113,113,107,104,118,127,121,114,117,117,123,126,122,128,139,138,139,126,127,126,135,134,138,134,134,124,127,130,127,118,127,127,127,124,119,122,115,113,112,123,121,120,118,113,123,120,121,123,123,132,133,125,132,133,130,123,132,130,136,128,130,128,132,128,124,128,126,132,128,129,132,132,128,127,128,133,131,141,139,144,140,138,136,139,143,142,152,156,148,139,136,127,138,156,152,138,132,112,104,124,92,95,133,110,129,120,104,83,115,95,121,137,137,130,135,123,123,116,122,134,148,151,149,130,130,123,117,131,128,139,132,134,120,126,111,108,119,119,125,125,123,112,106,105,111,119,120,122,126,135,128,116,117,122,131,131,139,131,136,130,128,122,121,123,132,139,141,132,122,118,119,122,126,128,144,139,141,126,126,115,124,142,144,165,146,145,138,141,131,137,134,146,159,152,139,131,132,119,109,112,113,127,132,114,119,107,104,104,112,108,130,121,124,123,142,119,113,125,130,139,138,137,135,128,138,119,130,132,120,139,138,139,117,121,109,116,124,128,126,120,120,125,111,116,108,113,118,130,125,130,122,120,127,131,131,129,135,132,130,123,127,124,124,133,141,134,131,124,128,127,127,133,134,138,138,130,130,131,128,133,140,147,139,145,139,152,144,132,143,133,154,135,130,134,147,141,105,138,106,118,119,118,91,121,105,114,119,123,103,122,128,125,121,128,132,134,137,128,130,127,138,130,129,135,136,133,133,134,126,120,124,124,128,122,116,122,128,123,115,117,119,122,123,115,120,116,121,118,126,127,126,126,123,135,131,130,127,130,129,128,124,129,135,131,127,135,127,124,124,133,136,131,134,134,135,134,137,132,134,135,146,141,151,136,146,140,132,133,128,129,133,144,144,133,126,119,120,118,124,103,109,118,110,123,117,116,100,122,118,133,126,124,133,136,136,130,128,128,140,135,128,140,123,130,129,128,132,130,122,123,126,127,122,122,118,123,119,120,123,118,120,117,123,120,120,119,120,121,130,122,128,128,125,121,128,123,125,127,126,132,132,130,126,134,124,131,132,131,132,129,130,132,134,135,134,139,135,143,137,132,143,136,140,154,143,129,125,129,133,145,142,129,123,121,110,103,132,103,109,117,121,107,120,116,110,121,126,107,121,134,123,128,138,136,122,130,131,132,135,134,121,136,132,129,128,127,125,128,127,127,130,119,117,122,116,120,125,114,121,120,116,117,123,119,121,126,123,129,124,126,126,129,122,127,127,125,136,134,136,133,129,128,132,132,131,137,133,136,139,134,134,132,131,139,139,138,142,143,138,134,144,128,139,131,136,140,152,139,143,133,118,123,111,113,125,108,121,119,119,107,120,114,113,124,120,125,125,127,125,132,132,136,130,133,134,136,133,138,128,131,134,138,128,131,129,131,127,126,127,118,122,127,125,127,123,116,113,117,119,110,120,117,122,119,128,124,124,120,122,126,132,126,126,133,134,141,136,138,129,137,126,134,136,140,136,137,136,145,135,136,145,139,145,144,144,127,138,128,128,140,147,132,144,133,117,125,102,114,113,111,124,124,120,115,127,113,118,115,126,132,129,128,128,124,126,131,125,130,132,130,135,137,132,134,124,140,132,129,129,131,129,130,129,115,126,119,123,128,127,120,120,115,116,115,110,112,121,120,120,128,120,119,120,121,125,134,131,142,147,141,140,134,130,131,132,133,135,138,136,140,135,142,141,148,148,148,135,144,141,132,142,139,137,154,130,117,109,98,116,114,103,128,112,121,119,125,107,108,116,127,120,123,123,126,133,133,130,124,130,123,131,132,134,126,131,129,140,133,125,129,129,122,128,125,123,124,125,124,123,130,114,124,111,122,108,115,115,124,110,113,130,120,124,124,129,129,140,136,139,137,136,136,140,134,136,128,136,134,139,134,137,147,141,152,142,144,139,139,144,158,152,132,124,115,139,101,101,125,94,121,122,118,104,125,108,113,112,118,124,121,128,130,122,117,134,124,124,134,128,126,132,131,129,131,140,132,133,131,131,125,126,134,125,117,130,126,130,118,115,116,110,112,127,110,120,113,127,126,124,120,127,134,136,147,141,143,147,145,144,145,135,144,142,140,150,139,137,140,146,148,166,143,152,152,139,123,143,115,117,83,135,108,103,116,109,109,118,118,100,116,106,124,128,129,122,127,129,143,131,129,128,132,122,139,127,132,133,134,136,132,130,123,129,123,133,126,121,127,120,115,121,106,119,105,116,99,118,99,120,118,125,129,134,128,128,133,128,132,140,150,152,154,143,152,145,152,142,138,141,156,146,149,152,156,154,154,148,128,132,92,94,147,83,112,121,107,109,114,101,95,102,95,115,117,129,126,122,136,135,121,141,133,127,128,139,128,137,132,130,135,124,136,125,131,122,130,123,129,137,115,129,116,113,111,104,104,102,116,101,121,119,123,118,128,128,123,129,128,137,138,143,147,144,141,141,146,135,149,134,150,159,165,149,170,148,151,165,125,121,114,107,143,77,112,110,108,116,109,100,86,117,94,113,101,120,115,125,124,136,117,129,135,138,126,136,130,144,128,145,136,120,149,123,137,132,132,128,137,129,118,128,109,120,110,106,102,104,102,118,125,121,126,122,127,127,126,131,134,138,141,142,145,147,152,154,159,143,145,162,162,164,168,168,135,134,156,130,112,102,126,107,84,127,100,100,101,107,92,107,103,104,98,115,127,118,131,128,129,125,136,135,130,134,132,145,137,128,145,125,130,137,131,124,136,118,135,117,126,112,132,108,113,110,105,94,110,123,123,132,128,137,125,131,129,140,132,144,145,154,146,144,139,147,140,149,152,150,174,174,176,154,165,140,114,127,114,110,101,94,145,91,110,101,95,80,108,94,95,105,115,132,124,119,128,137,123,129,133,137,131,142,138,146,129,139,125,136,125,124,131,130,138,133,123,129,124,114,106,118,99,93,109,117,122,124,133,134,125,132,128,129,131,152,151,147,159,144,151,142,159,139,158,149,180,160,173,146,129,150,120,127,90,112,65,123,132,81,91,98,98,87,100,95,95,109,123,128,126,118,129,131,141,127,133,141,133,142,135,144,135,117,131,142,125,108,125,134,123,121,132,116,111,115,92,106,97,104,105,125,131,130,133,135,128,129,132,149,156,141,154,154,156,148,158,158,146,152,172,168,165,178,127,152,129,122,105,91,68,102,134,34,124,109,80,76,115,95,66,122,122,109,142,138,133,123,129,135,154,145,138,152,152,152,145,139,109,135,126,125,144,112,106,124,100,107,115,104,77,120,102,118,108,116,110,139,136,138,146,139,145,147,162,141,152,143,159,180,169,162,164,152,174,170,173,180,128,144,130,144,110,63,76,118,86,43,150,67,79,85,104,92,93,115,110,128,133,134,132,139,129,147,159,159,143,151,159,150,156,130,126,129,130,126,138,113,108,95,102,117,95,92,94,90,106,117,114,108,129,132,139,148,149,141,147,146,154,168,145,154,159,160,169,168,156,162,162,190,182,186,132,119,128,118,92,105,84,53,125,95,30,95,82,61,85,130,82,111,125,120,130,122,145,144,151,140,160,160,140,138,156,136,139,145,137,129,124,112,132,107,93,108,117,104,90,117,95,90,105,114,114,127,128,140,144,143,138,159,160,150,154,156,150,156,151,159,147,158,168,164,197,168,172,109,113,169,117,101,104,122,81,70,90,47,86,94,91,98,119,91,95,126,122,122,143,136,144,152,144,156,139,143,152,159,136,126,132,129,133,127,126,115,114,100,114,109,98,106,100,87,100,110,113,121,124,143,137,137,137,152,150,158,170,164,152,151,136,140,154,152,160,168,168,165,158,166,173,125,126,134,94,95,110,93,78,87,57,90,86,67,76,120,107,106,121,127,114,134,148,139,147,141,146,150,150,130,140,140,147,138,136,124,119,111,118,118,124,111,110,108,95,111,87,93,127,104,118,126,140,132,130,142,152,160,146,152,154,154,142,147,158,160,142,154,160,152,154,164,168,162,124,149,134,99,111,108,77,118,92,51,107,95,75,103,122,92,88,120,95,140,145,125,133,145,136,143,139,138,146,154,146,145,135,111,129,139,133,119,122,102,108,104,87,122,116,100,110,118,95,107,118,128,140,142,146,147,152,135,152,162,162,158,148,146,158,150,148,160,159,180,145,159,158,133,145,128,146,123,116,87,85,95,89,62,110,111,57,90,95,100,109,119,128,137,121,135,136,144,138,139,147,147,149,134,143,134,138,134,124,121,122,118,114,127,108,93,101,111,106,90,101,114,108,109,124,138,116,126,138,156,158,149,152,154,162,148,151,154,151,152,152,159,166,145,150,176,154,123,138,143,134,123,101,101,97,78,52,127,115,65,81,88,89,104,124,101,134,115,110,144,154,127,128,152,156,154,138,132,137,152,140,118,127,136,113,113,121,117,109,99,115,118,95,89,92,122,119,108,129,132,127,120,131,149,156,150,154,154,149,148,154,154,154,152,160,144,169,162,145,162,148,133,136,140,147,127,113,91,54,126,102,74,114,97,99,77,98,110,95,107,137,131,140,115,131,135,139,144,149,154,143,142,140,137,133,134,129,140,135,113,106,107,106,127,114,105,108,97,106,117,127,125,119,127,129,134,132,142,154,151,152,152,148,149,152,146,160,166,154,145,147,180,158,150,164,133,127,135,142,134,100,108,68,77,138,76,89,89,100,98,93,99,108,111,130,134,127,122,117,136,148,154,140,150,136,145,152,146,120,134,148,129,131,117,111,112,106,122,120,112,91,98,110,119,119,117,128,120,120,129,137,137,148,152,156,152,139,144,152,150,147,154,165,160,139,151,162,143,154,156,142,138,130,120,127,119,55,103,147,71,102,95,82,89,80,118,128,103,117,123,114,121,114,136,149,143,131,146,135,120,148,156,148,148,124,110,133,118,108,135,125,110,106,109,123,109,105,122,121,126,119,125,122,128,140,135,154,147,130,144,148,145,151,142,150,156,147,152,151,133,147,135,156,166,162,137,146,176,110,67,63,133,166,97,82,102,80,65,95,122,115,104,101,127,122,98,113,133,145,137,127,143,136,119,135,154,156,125,124,129,128,123,114,122,124,128,114,115,114,118,123,123,132,124,104,114,132,133,129,135,138,141,135,135,144,139,135,142,147,152,150,138,148,154,143,144,156,159,154,151,151,154,128,106,88,116,111,98,123,109,105,80,79,106,92,111,115,127,126,95,98,116,144,142,144,137,119,120,133,147,150,127,128,139,129,122,115,118,133,134,121,121,118,111,115,136,141,122,117,114,129,135,124,134,140,139,137,135,132,130,130,141,152,149,140,135,137,150,147,140,156,154,131,137,147,144,162,160,122,103,105,90,122,138,109,114,103,90,109,100,99,127,119,123,119,97,107,135,143,131,124,120,129,135,130,135,131,129,130,127,127,125,121,126,135,128,121,123,125,130,135,129,135,129,121,128,133,132,130,125,132,131,131,129,135,125,121,132,135,137,130,130,136,142,141,135,134,135,139,142,149,149,137,135,118,108,124,133,131,114,115,113,114,120,113,125,123,116,114,114,122,119,123,128,123,125,116,124,126,125,126,128,124,122,130,131,128,124,123,128,131,128,128,129,130,131,129,128,133,128,123,128,128,128,126,127,137,131,122,128,128,136,127,133,131,130,138,140,140,128,128,131,134,131,133,136,138,135,130,135,127,131,127,124,125,133,125,110,126,127,124,115,121,132,121,118,123,133,130,111,122,130,125,123,127,127,125,115,118,127,127,125,127,131,125,121,126,129,130,128,128,137,135,130,121,125,135,135,128,131,135,130,136,138,128,130,131,124,134,127,124,117,128,132,125,120,131,149,137,137,130,132,128,128,135,133,127,137,133,134,126,121,134,135,132,134,129,129,121,128,134,125,133,128,133,129,115,123,125,123,128,123,125,124,124,128,128,123,135,128,122,112,120,126,125,130,125,130,123,128,128,128,133,135,135,123,124,125,123,133,118,128,127,124,125,120,131,129,131,118,126,132,130,129,133,150,154,138,132,142,136,138,125,149,146,125,128,128,140,123,127,135,121,123,129,122,126,129,134,141,134,135,127,137,144,134,123,135,136,144,124,128,131,133,129,131,127,113,130,133,127,140,128,114,134,128,139,131,106,125,127,137,124,124,121,130,134,136,135,107,122,139,122,85,114,169,137,166,109,133,131,121,124,137,110,106,120,159,131,140,121,118,124,123,159,128,106,132,110,151,116,135,116,112,174,158,123,130,92,136,134,107,135,141,129,125,122,133,129,129,131,170,151,137,137,108,131,129,121,125,140,149,140,122,128,128,103,128,124,136,123,113,129,120,123,128,135,135,131,149,152,130,109,133,121,127,107,117,120,139,125,127,147,114,117,118,125,144,123,137,114,131,117,119,148,131,128,109,135,126,139,142,123,146,149,114,130,129,134,135,140,156,111,124,140,138,135,130,144,146,107,127,138,127,128,152,148,149,130,123,107,133,121,137,129,128,117,103,125,131,113,128,137,131,124,127,128,140,114,115,144,138,93,107,135,111,131,115,135,137,102,111,131,118,124,124,160,117,136,125,128,120,120,132,131,132,130,125,129,124,104,114,125,122,113,154,152,110,117,128,140,147,152,114,109,117,131,152,131,137,147,146,154,154,162,135,121,125,101,135,156,135,139,125,117,128,110,128,135,121,152,158,131,120,132,142,140,121,128,145,135,111,128,126,136,150,141,152,154,148,123,123,125,128,145,130,141,121,99,117,121,136,134,168,130,125,119,122,142,114,144,125,137,107,125,106,113,110,117,118,128,131,136,135,120,100,118,124,131,135,114,141,128,124,154,130,147,110,123,106,110,106,135,116,118,133,114,164,120,128,105,126,135,126,133,150,128,146,128,104,103,132,125,127,115,104,121,129,107,117,122,124,135,117,124,127,121,114,127,141,126,141,128,128,124,135,118,125,125,154,125,121,122,118,127,112,134,139,141,125,135,110,110,120,105,130,108,131,125,103,105,133,112,135,136,133,135,125,118,131,132,132,139,139,139,127,126,121,133,125,136,131,121,145,126,110,110,131,119,129,124,156,135,108,145,156,133,131,135,158,154,131,144,123,154,133,119,128,127,117,126,120,127,131,133,127,136,135,132,141,121,128,139,134,127,120,121,128,121,139,145,132,129,125,119,132,129,142,126,125,112,105,121,121,135,139,130,131,128,134,114,132,132,125,121,116,131,128,130,132,114,124,121,122,135,117,134,109,115,125,106,129,127,133,117,125,137,140,137,127,120,128,110,141,139,119,144,125,142,128,135,135,141,125,128,114,116,139,143,140,126,137,122,121,121,146,125,120,128,130,131,125,126,116,118,121,126,126,126,133,125,127,128,129,128,130,130,121,128,131,130,135,133,128,123,126,129,126,128,128,128,117,121,121,126,125,121,125,121,119,121,133,125,121,123,131,131,128,122,134,136,138,125,123,121,128,133,134,123,122,133,124,130,132,129,138,123,120,130,129,125,132,132,131,128,123,119,128,122,121,131,150,138,128,118,111,111,127,120,124,125,130,126,128,127,125,127,131,138,128,130,118,128,133,128,127,121,127,128,128,125,119,120,123,128,130,125,135,128,127,128,123,120,125,130,131,121,123,125,133,137,127,118,121,128,128,128,124,121,133,123,128,125,125,128,136,133,126,125,121,129,126,127,128,135,129,142,136,126,125,127,132,125,128,128,131,121,126,133,127,127,125,128,126,132,132,134,132,127,125,124,128,121,127,135,131,128,125,126,128,126,124,129,128,128,129,128,125,127,128,129,131,127,127,125,131,128,125,121,122,125,120,125,122,121,124,128,126,124,119,128,130,128,127,127,128,128,128,131,132,128,130,125,128,131,127,128,128,128,130,130,128,125,129,135,141,135,131,128,128,128,128,128,129,130,131,128,125,128,127,128,135,131,130,135,133,135,132,132,136,134,131,132,128,131,135,131,124,121,119,127,127,123,124,123,125,124,130,125,119,121,128,129,125,121,126,128,124,125,127,128,125,128,131,128,125,125,132,134,130,127,128,135,131,130,129,125,122,125,131,130,125,125,128,126,123,122,127,128,128,130,129,128,126,121,129,134,133,128,130,130,135,133,131,132,130,133,132,134,128,129,134,135,135,128,128,131,132,128,127,127,125,121,119,124,122,121,123,125,125,122,122,124,123,126,134,130,125,125,125,126,128,126,128,128,128,126,123,121,125,128,128,127,125,122,127,131,131,127,129,131,128,128,125,127,124,128,131,133,130,124,124,129,133,135,131,131,128,129,131,134,136,135,133,135,135,131,133,136,131,129,128,125,125,119,121,133,95,118,159,121,98,123,124,114,100,118,142,118,123,131,128,128,127,128,122,132,129,128,131,128,125,129,137,128,126,121,128,138,128,126,121,126,129,131,125,125,123,117,128,131,126,118,125,128,128,122,123,131,128,126,127,128,124,127,131,131,133,121,118,122,127,128,131,128,130,128,122,128,124,122,129,133,131,124,123,124,128,132,131,128,126,128,126,126,128,131,132,134,135,131,128,128,135,140,139,131,131,133,133,134,137,142,141,130,128,125,118,121,127,133,129,115,113,115,116,121,125,130,128,121,119,128,125,125,138,140,129,121,128,131,131,126,128,134,128,123,121,124,121,118,125,130,129,123,122,129,131,128,131,134,133,131,128,134,129,129,133,140,133,128,132,131,131,134,137,137,138,133,133,138,138,139,138,134,130,122,123,120,121,121,118,118,119,114,112,120,126,128,128,128,125,127,131,132,131,130,139,136,130,128,124,127,129,135,129,123,113,123,124,125,123,121,125,125,125,126,125,121,127,130,130,126,123,128,127,124,128,135,135,128,127,125,125,125,135,134,125,121,126,128,119,120,127,131,125,119,119,113,115,126,132,127,119,117,126,129,128,129,135,135,131,131,131,128,128,135,144,135,127,122,125,132,132,135,131,128,130,133,131,130,131,135,137,136,136,131,128,126,130,132,129,128,125,125,117,118,126,126,125,124,127,129,128,125,132,135,134,131,134,132,130,134,135,129,126,128,129,126,125,128,125,119,124,125,123,119,126,126,121,125,124,125,123,128,129,129,128,124,127,129,131,128,129,136,134,128,119,128,131,135,132,129,118,117,123,124,125,119,125,123,121,119,118,121,126,133,128,126,117,120,124,135,138,133,128,128,131,128,130,127,134,138,137,133,120,121,129,146,141,128,112,118,135,137,132,128,130,125,128,133,133,126,128,145,141,125,119,131,135,137,131,109,110,137,142,107,114,121,117,112,125,135,108,115,128,121,102,113,123,125,135,129,130,115,131,135,129,127,133,130,121,128,123,120,121,135,134,121,117,123,125,127,129,123,127,121,124,122,124,128,127,134,130,126,121,123,130,135,138,126,122,123,128,123,128,131,133,126,116,118,113,124,130,131,125,119,114,118,128,131,131,131,131,126,124,128,142,143,138,133,128,125,133,140,138,131,128,130,133,128,125,126,135,133,128,126,125,127,125,128,125,121,121,128,129,125,121,129,136,131,128,125,130,132,133,133,130,128,125,125,125,122,122,128,129,125,113,114,121,127,124,123,123,122,114,120,125,131,124,124,128,129,128,125,134,134,133,129,135,134,130,125,125,130,129,128,121,121,124,123,125,125,125,123,121,125,126,123,125,128,133,135,127,128,128,126,125,128,128,123,121,128,136,135,128,130,125,126,120,126,128,126,130,134,131,131,128,123,129,131,132,121,125,128,122,114,110,121,121,132,128,126,115,121,125,127,127,128,138,130,128,125,131,128,128,128,134,134,125,127,129,137,132,128,128,126,131,124,128,131,130,129,125,123,118,116,125,138,133,121,114,122,128,129,130,132,135,133,131,135,128,130,137,143,143,134,121,123,128,131,131,128,124,125,121,134,128,125,122,129,128,132,127,130,135,136,134,128,128,135,133,138,146,143,135,133,135,146,142,131,125,131,146,162,135,122,119,123,148,143,69,98,127,143,160,87,102,117,107,120,134,112,131,128,139,142,100,125,146,147,139,129,107,128,136,137,152,131,125,121,125,132,122,103,121,119,113,111,111,121,133,135,133,126,108,119,122,128,133,127,128,136,129,128,126,128,132,128,128,129,131,139,127,118,136,119,121,116,123,121,123,125,132,128,123,128,121,125,124,117,120,131,131,135,135,128,134,124,129,132,136,131,130,126,131,131,128,133,131,128,124,114,118,118,114,134,140,133,128,126,126,129,131,135,135,131,126,129,133,133,132,133,145,134,126,125,126,125,131,131,128,122,117,120,125,125,127,127,128,127,121,122,126,125,125,126,128,125,133,130,136,141,135,136,135,123,128,131,133,138,128,120,122,117,126,127,128,120,117,120,120,111,114,124,131,128,121,121,126,131,136,141,134,131,128,133,139,142,127,138,135,132,132,133,129,138,130,132,119,118,121,128,123,128,119,121,123,120,125,128,125,125,128,133,138,141,146,139,139,135,138,141,135,128,127,125,125,121,120,124,116,121,118,123,118,121,122,124,117,114,115,126,130,139,141,135,136,130,132,135,132,138,135,135,137,135,133,130,122,124,125,123,123,125,128,128,125,120,114,114,121,127,131,133,131,128,126,122,123,125,130,135,142,137,128,132,137,137,130,125,122,125,127,131,129,122,113,119,121,121,122,119,118,121,123,126,131,127,131,136,129,121,129,135,148,141,135,128,126,129,144,140,135,125,125,129,132,131,131,126,121,126,128,130,128,123,128,130,121,130,128,128,140,136,134,131,124,137,144,144,143,148,135,89,89,127,164,136,98,106,103,108,117,126,126,114,97,114,111,114,128,139,147,130,115,116,143,152,151,143,128,115,115,133,156,146,129,128,119,124,121,123,128,121,113,115,120,124,121,122,126,125,117,117,127,134,132,128,128,129,129,135,142,139,131,127,128,133,132,132,131,128,125,121,123,123,122,120,120,117,117,118,123,125,126,124,125,125,129,131,131,134,134,133,132,133,133,134,133,131,131,129,128,128,128,127,125,124,124,122,121,123,124,124,124,124,125,125,126,128,130,129,129,131,132,133,132,132,131,131,130,131,131,131,129,128,126,126,126,128,128,127,125,124,124,125,126,125,125,126,128,128,128,128,128,128,129,129,131,131,132,134,135,132,128,128,129,130,130,130,130,128,127,126,127,125,126,125,127,125,121,122,124,125,130,128,128,128,126,128,128,129,130,131,131,134,131,131,129,128,127,127,127,127,129,128,124,123,126,125,127,124,125,125,128,128,128,128,128,128,131,131,128,130,128,132,131,131,129,130,128,131,131,132,128,128,128,127,125,125,125,128,128,131,130,121,121,121,131,135,125,125,127,128,136,133,129,128,122,128,137,134,131,128,128,131,129,132,135,133,129,128,127,128,128,132,133,129,120,125,125,128,132,130,128,124,125,126,130,128,126,121,126,130,130,129,130,126,125,128,127,131,128,128,128,125,122,122,125,128,128,123,122,121,125,127,129,127,125,121,125,129,131,133,130,127,127,128,132,134,132,131,129,125,129,128,132,131,128,123,124,126,129,127,126,128,120,124,123,129,128,127,123,127,125,132,130,134,129,123,126,130,135,143,135,129,131,123,128,135,131,130,136,126,129,130,126,126,125,125,125,119,125,128,125,128,122,128,132,131,126,128,125,135,137,135,128,125,125,128,132,128,127,124,125,125,126,124,126,124,125,122,125,126,125,126,128,127,125,126,128,132,129,128,127,128,129,132,133,131,126,125,128,131,131,129,126,125,124,125,128,128,125,122,124,119,123,125,128,126,123,121,123,125,126,130,128,128,121,124,128,132,133,128,128,128,131,132,137,129,131,127,131,134,134,131,130,129,128,130,129,136,128,128,125,128,127,130,128,129,125,125,126,132,129,130,128,125,127,128,130,135,132,125,126,127,135,135,128,128,125,127,135,134,130,130,125,128,139,137,131,128,128,131,134,137,142,133,139,142,107,107,131,166,152,109,107,120,107,132,150,141,103,85,117,145,130,126,121,122,117,118,144,146,122,113,130,135,131,130,142,141,125,118,131,139,135,130,131,127,117,119,135,140,128,117,114,118,124,129,134,128,114,109,119,133,135,128,125,118,119,127,137,141,132,123,124,130,133,135,136,131,125,123,128,133,131,128,127,123,123,124,128,129,125,121,121,122,125,128,128,127,122,120,125,128,130,129,128,125,125,128,132,132,129,128,126,128,129,131,131,128,124,125,127,128,129,130,127,124,123,126,128,128,127,126,124,123,124,129,128,128,127,125,124,127,127,130,130,128,126,126,128,131,129,128,130,128,129,130,131,128,127,127,130,135,128,130,130,130,128,131,130,131,128,131,131,129,128,129,128,129,128,128,129,125,127,126,128,125,127,125,129,126,128,128,128,125,128,128,133,132,130,128,128,128,130,129,128,133,128,129,131,131,128,129,126,128,125,129,127,128,127,127,127,127,127,127,125,128,128,128,129,130,128,129,128,131,131,133,133,132,128,128,130,134,134,131,128,125,126,129,132,129,125,121,124,127,128,125,124,120,121,122,127,126,124,122,123,124,126,126,128,127,127,127,128,128,128,130,131,132,131,131,131,133,131,131,131,129,130,130,131,130,128,128,128,128,128,128,128,127,125,127,128,127,127,127,128,128,129,128,128,126,128,130,131,132,131,133,132,133,128,129,128,128,131,134,133,133,134,135,135,134,134,135,132,125,124,132,135,130,125,126,124,126,130,136,130,122,121,125,124,125,124,125,124,122,127,133,131,126,123,125,124,126,129,133,130,126,128,128,129,128,130,129,128,126,128,131,129,128,127,125,125,126,128,128,126,125,127,126,127,128,128,128,127,126,127,128,128,129,128,125,125,126,128,128,128,128,127,126,127,128,130,128,126,127,127,128,128,129,128,127,126,128,128,128,128,128,127,127,127,128,128,128,127,126,127,127,128,128,128,127,127,127,128,128,128,128,127,126,128,129,128,128,127,127,126,127,128,129,127,126,126,127,127,128,129,127,124,123,126,129,128,127,126,126,126,128,128,128,126,126,128,128,128,128,127,128,127,129,130,129,128,129,129,129,128,128,128,128,128,129,128,128,127,128,129,128,126,127,126,127,128,128,128,127,127,127,127,127,129,129,129,129,129,128,127,127,129,130,130,129,128,128,129,130,130,130,129,128,128,129,129,129,130,129,128,128,129,129,128,127,127,127,128,128,128,126,126,126,127,128,128,128,129,129,128,127,128,128,129,129,129,128,128,129,130,129,128,128,128,128,128,128,128,128,128,127,128,128,128,128,128,126,126,126,127,127,128,126,126,125,126,127,128,127,127,127,126,127,129,129,128,127,128,128,129,129,129,129,128,128,128,129,129,128,128,127,127,128,128,128,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,128,128,128,128,128,128,129,128,128,128,128,129,128,128,128,127,127,128,129,128,127,127,127,127,128,129,128,127,127,127,128,128,128,128,127,127,127,128,129,128,128,126,127,127,128,129,128,127,126,126,128,129,128,127,126,126,127,128,129,128,127,127,127,127,128,128,128,127,125,126,128,128,128,127,127,126,126,127,128,128,127,127,127,127,128,128,128,128,127,128,129,129,129,128,128,128,128,128,128,128,128,128,128,128,127,127,126,127,126,126,126,126,126,126,126,127,127,127,127,128,128,128,128,129,128,128,128,128,128,128,128,128,128,128,128,128,128,127,127,127,127,127,127,127,127,126,127,128,128,127,127,127,127,128,128,128,128,128,128,128,128,129,129,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,128,128,128,128,128,129,129,129,128,128,128,129,129,129,128,128,129,129,130,129,129,129,129,129,129,129,129,128,128,128,129,128,129,128,128,128,129,129,129,128,129,129,130,129,129,129,129,129,129,129,129,129,129,129,129,129,128,128,128,128,129,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,128,129,128,129,129,129,129,129,129,129,129,129,129,129,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,129,128,128,128,128,129,128,128,128,128,128,128,128,129,128,128,128,128,128,128,128,128,128,127,127,127,128,128,128,128,127,127,127,128,127,128,128,127,127,127,127,127,127,127,127,127,128,127,128,128,127,127,127,127,127,127,128,128,127,126,127,127,128,127,128,127,127,127,128,128,128,128,127,127,127,127,128,128,127,127,127,127,127,127,127,127,127,127,127,128,128,128,128,128,129,129,128,128,128,129,129,128,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,129,128,128,128,128,128,129,129,129,128,128,129,129,129,129,129,129,128,128,129,129,128,128,128,128,128,128,129,128,128,128,128,128,128,128,128,128,128,128,128,128,129,128,128,128,128,128,128,128,128,127,128,128,128,128,128,128,128,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,128,128,128,128,128,128,128,127,127,127,128,128,128,128,128,127,127,128,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,128,128,128,128,128,129,128,128,128,128,129,129,129,128,128,128,128,129,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,129,129,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,127,127,127,127,127,127,128,128,128,128,128,127,128,127,128,128,127,127,127,127,128,128,128,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,127,128,128,127,127,127,127,127,127,128,128,128,127,127,127,128,128,127,127,127,127,127,127,127,127,127,127,127,127,128,128,127,127,127,127,127,128,128,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,126,127,127,128,127,127,127,127,127,127,127,127,127,127,128,128,128,127,128,128,128,128,128,128,128,128,128,128,128,127,127,128,128,128,128,127,127,127,102,124,132,151,150,143,127,111,111,124,137,146,139,129,122,118,119,129,138,136,130,123,121,122,127,132,132,101,109,131,136,144,131,120,114,117,125,136,140,134,128,122,119,128,136,135,131,125,124,127,131,136,136,125,121,113,119,129,152,141,133,122,119,124,135,137,135,127,122,121,130,129,131,132,131,128,124,128,132,130,126,124,121,124,131,131,132,126,122,124,125,133,132,130,126,123,124,127,132,134,130,124,122,104,118,137,137,141,125,118,122,127,131,134,121,105,115,130,135,146,133,127,122,125,127,133,133,131,131,122,124,130,134,136,128,126,121,125,132,138,134,125,120,119,130,134,137,130,119,117,110,132,132,141,134,126,121,121,129,132,133,132,128,126,126,129,130,131,130,130,129,125,130,132,136,131,114,137,133,132,129,123,120,117,121,127,130,128,124,121,126,129,131,131,132,126,124,126,130,132,135,134,130,129,127,133,132,128,133,128,127,126,127,132,129,126,126,125,124,126,126,127,125,124,126,127,128,129,128,125,126,128,129,130,130,128,129,128,127,131,130,132,127,129,130,127,127,129,128,129,129,128,125,126,126,124,127,128,126,127,128,126,128,130,125,127,129,127,128,129,128,130,128,126,129,126,128,124,132,128,122,130,128,126,130,128,122,131,130,112,130,138,132,126,125,126,123,127,131,133,124,129,129,130,123,129,130,126,127,125,128,127,127,129,126,125,125,130,129,127,127,128,128,123,130,129,128,130,130,126,128,128,128,130,128,122,131,130,132,130,127,127,128,130,129,126,130,127,130,125,129,130,126,131,131,127,126,126,126,129,131,130,132,128,124,129,127,124,129,138,130,125,125,125,126,131,130,130,130,126,127,129,127,124,129,130,132,131,119,122,125,125,133,128,127,126,126,126,126,128,129,132,133,129,129,131,130,133,134,131,127,126,131,131,132,129,129,127,128,129,126,128,125,125,128,127,125,128,126,126,129,129,129,126,128,130,129,129,131,129,130,130,131,130,128,128,132,133,130,131,128,128,126,130,129,129,128,126,126,128,128,128,129,128,127,128,129,126,129,130,130,130,127,128,129,130,130,128,129,128,128,129,128,128,128,128,126,126,126,128,128,125,126,126,128,127,127,128,127,128,127,128,129,128,130,127,129,129,128,129,128,129,128,126,127,127,128,125,127,129,127,129,126,127,126,128,125,126,128,126,129,128,127,128,129,130,127,127,128,130,132,131,127,126,127,127,129,128,127,129,126,126,127,127,128,128,129,127,126,128,128,128,129,128,128,129,127,128,128,129,129,128,127,129,128,127,127,129,129,128,128,129,126,128,128,128,130,126,127,128,128,129,127,129,128,126,129,129,128,126,128,128,128};
    
    
    //********************************************
    
    
    
    void setup() {   
      
      analogWriteFrequency(3,31250);
      analogWriteResolution(8);
      analogWrite(3,127);
      
    }
    
    int ergolen=19606;
    int ergopos=0;
    int value1=0;
    
    
    void loop() {
    
      if(microTime>65){
        ergopos++;
        
        if(ergopos>ergolen){ergopos=0;}
        
        value1=(ergo[ergopos]);
        
        microTime=0;
        analogWrite(3,value1);
      }
    
    
    
    }
    Last edited by bloodline; 02-19-2014 at 10:59 PM. Reason: edited the PWM freq from 22050 to 31250

  10. #10
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Quote Originally Posted by jopiek View Post
    So basically, I just need to get some good samples (http://www.capnobase.org and http://www.physionet.org etc) and start testing the sounds I guess (while I wait on our OSH circuit boards )
    If you need help converting the audio files to data, let me know.

  11. #11
    Senior Member
    Join Date
    May 2013
    Posts
    130
    Hi bloodline, thanks a lot!!! Next week I have quite some time for testing!!! I will let you know the results! Johan

  12. #12
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Quote Originally Posted by jopiek View Post
    Hi bloodline, thanks a lot!!! Next week I have quite some time for testing!!! I will let you know the results! Johan
    I have rewritten the playback code to use the IntervalTimer, which alllows for non blocking audio I'll write a complete audio class for you when I get the time

  13. #13
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Here is the Code, it should be pretty self explanatory... but let me know if you have problems. Happy for anyone to use code, but I would like some credit in the final product

    I hope to improve the code, but I will keep the API the same, so you can simply drop in the new code as I improve it without affecting any code that relies on it.

    I am running the PWM output via an 8Ohm 3Watt speaker (probably stressing the Teensy a bit with such a low impedance, but the max Freq response is 15Khz so acts as a lowpass filter), and the audio quality is fantastic. All 10 of the PWM pins are supported and can all play back at the same time.

    Only 3 methods, play and pause and unpause... play resets the playback.

    If you play back a sample using the same pin as an already playing sample, the newer sample will take precedence (no mixing yet).

    When a sample is played, it does not block the code and is played back via interrupts in the background.
    Read the "playing" variable to see if sample is still playing. 1 means it is still playing, 0 means it has finished (or has been paused).
    Attached Files Attached Files
    Last edited by bloodline; 02-22-2014 at 09:50 PM.

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,556
    Quote Originally Posted by bloodline View Post
    I am running the PWM output via an 8Ohm 3Watt speaker (probably stressing the Teensy a bit with such a low impedance, but the max Freq response is 15Khz so acts as a lowpass filter), and the audio quality is fantastic. All 10 of the PWM pins are supported and can all play back at the same time.
    Any chance you could share a photo?

    I'd love to show this on the Teensy Projects page, with a link to this thread. Or if you have a website, blog or other page, I'd like to that.

  15. #15
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Quote Originally Posted by PaulStoffregen View Post
    Any chance you could share a photo?

    I'd love to show this on the Teensy Projects page, with a link to this thread. Or if you have a website, blog or other page, I'd like to that.
    Certainly! I could post a video too if you like, that will show the audio

  16. #16
    Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    76
    Here is a video of my poor abused Teensy 3.1 set up for audio playback

    http://youtu.be/jKQbtNxmpF4

    -edit- I have added another method to the code here, to to allow playback at different speeds, using an equal temperament scale. The sample rate now plays back at 31,250Hz (32us interrupt) but only fetches the next sample at the required rate for the desired pitch. And I am using The Teensy's awesome MIDI device feature
    Last edited by bloodline; 02-25-2014 at 10:43 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •