JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="ciclo" id="ciclo" maxlength="4" onkeypress="tenta()">
<input type="text" readonly id="lol">

JavaScript

function tenta() {
    var x = document.getElementById('ciclo').value;
    document.getElementById('lol').value = parseFloat(x) + 3;
}