# your code goes here
def bouquets(narcissus_price, tulip_price, rose_price, summ):
n=int(summ//narcissus_price)
k=int(summ//tulip_price)
p=int(summ//rose_price)
count=0
for i1 in range(0,n+1):
for i2 in range(0,k+1):
for i3 in range(0, p+1):
if i1*narcissus_price+i2*tulip_price+i3*rose_price<=summ:
if (i1+i2+i3)%2!=0:
count+=1
else:
break
return count
print( bouquets(200,300,400,100000) )
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCmRlZiBib3VxdWV0cyhuYXJjaXNzdXNfcHJpY2UsIHR1bGlwX3ByaWNlLCByb3NlX3ByaWNlLCBzdW1tKToKICAgICAgICBuPWludChzdW1tLy9uYXJjaXNzdXNfcHJpY2UpCiAgICAgICAgaz1pbnQoc3VtbS8vdHVsaXBfcHJpY2UpCiAgICAgICAgcD1pbnQoc3VtbS8vcm9zZV9wcmljZSkKICAgICAgICBjb3VudD0wCiAgICAgICAgZm9yIGkxIGluIHJhbmdlKDAsbisxKToKICAgICAgICAgICAgZm9yIGkyIGluIHJhbmdlKDAsaysxKToKICAgICAgICAgICAgICAgIGZvciBpMyBpbiByYW5nZSgwLCBwKzEpOgogICAgICAgICAgICAgICAgICAgIGlmIGkxKm5hcmNpc3N1c19wcmljZStpMip0dWxpcF9wcmljZStpMypyb3NlX3ByaWNlPD1zdW1tOgogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaTEraTIraTMpJTIhPTA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCs9MQogICAgICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAgcmV0dXJuIGNvdW50CgpwcmludCggYm91cXVldHMoMjAwLDMwMCw0MDAsMTAwMDAwKSAp