<?php
$debt = "40000";
$day = 0;
for ($debt = 40000 + 1000 * 1.03; $debt > 0; $debt = ($debt + 1000 * 1.03)) {
$debt = ($debt - 5000);
$day++;
}
echo $day;
?>
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokZGVidCA9ICI0MDAwMCI7CgokZGF5ID0gMDsKCmZvciAoJGRlYnQgPSA0MDAwMCArIDEwMDAgKiAxLjAzOyAkZGVidCA+IDA7ICRkZWJ0ID0gKCRkZWJ0ICsgMTAwMCAqIDEuMDMpKSB7CgkkZGVidCA9ICgkZGVidCAtIDUwMDApOwoJJGRheSsrOwp9CgplY2hvICRkYXk7Cgo/Pg==