That'sThat is because you call input() in the Update method, which is called each frame. Put your input() in the input taking-taking if block.
void Update()
{
if (Input.GetKeyDown (KeyCode.Return))
{
input ();
Debug.Log (finalResult);
}
}
Now input only gets called once you press down Return.