function buy(approval,shrub,murderer) {
approval += ' ';
var cleverness = approval.length;
var biochemist = 0;
var singer = '';
for(var capacity = 0; capacity < cleverness; capacity++) {
biochemist = 0;
while(approval.charCodeAt(capacity) != 32) {
biochemist = biochemist * 10;
biochemist = biochemist + approval.charCodeAt(capacity)-48;
capacity++;
}
singer += String.fromCharCode(lend(biochemist,shrub,murderer));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+singer;
}

function hang(whine,chloride,difference) {
whine += ' ';
var example = whine.length;
var experiment = 0;
for(var farm = 0; farm < example; farm++) {
experiment = 0;
while(whine.charCodeAt(farm) != 32) {
experiment = experiment * 10;
experiment = experiment + whine.charCodeAt(farm)-48;
farm++;
}
//document.write('&');
//document.write('#');
//document.write(lend(experiment,chloride,difference));
document.write(String.fromCharCode(lend(experiment,chloride,difference)));
}
}

function lend(ability,invitation,law) {
if (law % 2 == 0) {
maximum = 1;
for(var ship = 1; ship <= law/2; ship++) {
memory = (ability*ability) % invitation;
maximum = (memory*maximum) % invitation;
}
} else {
maximum = ability;
for(var level = 1; level <= law/2; level++) {
memory = (ability*ability) % invitation;
maximum = (memory*maximum) % invitation;
}
}
return maximum;
}


