JSFiddle - React, Tailwind, and code Playground
JavaScript
var generalCellAmount=prompt("General cell amount is ...", "");
var columnCellAmount = function(generalCellAmount){return Math.floor(Math.sqrt(generalCellAmount))};
//To get the amount of cells in every side of square, I am getting a square root of general cell amount.
alert(columnCellAmount(generalCellAmount));