let nombreDePesees n =
let restant = ref n in
while ( !restant > 3) do
if !restant - (!restant/3)*3 = 2 then restant:= !restant - ((!restant/3)*2)-1
else restant:= !restant - ((!restant/3)*2)
;
done;
;;
let _ =
nombreDePesees n;
bGV0IG5vbWJyZURlUGVzZWVzIG4gPQogICBsZXQgcmVzdGFudCA9IHJlZiBuIGluCgogICB3aGlsZSAoICFyZXN0YW50ID4gMykgZG8KICAgICAgcHJpbnRfaW50ICFyZXN0YW50OwogICBwcmludF9uZXdsaW5lKCk7CiAgIGlmICFyZXN0YW50IC0gKCFyZXN0YW50LzMpKjMgPSAyIHRoZW4gcmVzdGFudDo9ICFyZXN0YW50IC0gKCghcmVzdGFudC8zKSoyKS0xCiAgIGVsc2UgcmVzdGFudDo9ICFyZXN0YW50IC0gKCghcmVzdGFudC8zKSoyKQogICA7CiAgIGRvbmU7CiAgIHByaW50X2ludCAhcmVzdGFudDsKOzsKCmxldCBfID0KICAgIGxldCBuID0gcmVhZF9pbnQgKCkgaW4KCiAgICBub21icmVEZVBlc2VlcyBuOw==