I would not recommend using static variables or shared preferences for sharing information like this, although it will work, it could cause issues down the road and isn't necessarily good practice. A cleaner solution would be to pass the string in the intents bundle. You can take a look at this stack overflow question to get an idea of how to do that.
In your case, right before you switch to your second activity you can add the string to the intent like this:
intent.putExtra("input", input);
and in your second activities on create retrieve the string like this:
input = getIntent().getExtras().getString("input", "");