error: conversion from 'int' to 'const String' is ambiguous
if(input > 5){
^
note: candidate: String::String(const __FlashStringHelper*)
String(const __FlashStringHelper *str);
^~~~~~
note: conversion of argument 1 would be ill-formed:
note: candidate: String::String(const char*)
String(const char *cstr = "");
^~~~~~
note: conversion of argument 1 would be ill-formed:
Because you are interested in the integral value of the input. readString() merely returns a string of characters, whereas parseInt() returns the numerical value of the input.
It's reading extra characters from the serial monitor.
Change the line ending setting to "none" (forget exactly, but not carriages rteturn or line feed.
Then no extra characters get sent.
Alternatively, learn about how to handle line ending characters. This will come in handy when you can't just go and turn them off, but have to deal with them when someone else is sending to you.
Okay then next time I will remember to drag a black marker across the entire code so only the serial monitor will be visible, which was purposely to demonstrate what happened in the serial monitor when running the code.