<?php

function totalEmployees($levels, $employees_per_level=7) {
    $total = 0;	
    while ($levels>=0) {
        $total += pow($employees_per_level, $levels);
        $levels--;
    }
    return $total;
}

$levels = 4;
echo 'Total employees count: '.totalEmployees($levels);

?>