n=input("n = ");
p=input("p = ");
s=0;
for k=1:n
    pr=binomial(p,n);
    s=s+k*pr(k+1);
end
afficher("Espérance = "+ string(s))