// Move to Laszlo and get his secret number.
var las = hero.findNearestFriend().getSecret();
// Add 7 to Laszlo's number to get Erzsebet's number.
var erz = las + 7;
// Move to Erzsebet and say her magic number.
// Divide Erzsebet's number by 4 and take the remainder to get Simonyi's number.
var sim = erz / 4;
// Go to Simonyi and tell him his number.
// Multiply Simonyi's number by Laszlo's to get Agata's number.
// Go to Agata and tell her her number.
var aga = sim * las;