<?php

$X = intval(trim(fgets(STDIN)));

do{
    $Z = intval(trim(fgets(STDIN)));
    
    if($Z > $X){
        break;
    }
    
}while($Z <= $X);

$count=1;
$i=$X;

do {

    $X+= $i++;    
    
    $count++;  
    if($X > $Z){
        break;
    }
    
} while (true);

echo $count . PHP_EOL;

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: