Here is a set of basic questions producing integer or string outputs. Answer them and format the result precisely with the JSON instructions provided:

Question 0 (Question id: q_yGIS):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 1 shrimp, 1 jellyfish, 3 dogs, 4 cows, 2 cockroachs?
 Respond with an integer.

Question 1 (Question id: q_d4qyZxbe):
Find the value of g in the equation: 114*g + 57 = 2109 Respond with an integer.

Question 2 (Question id: q_X9sy):
Your job is to return the last character of a string as a string. For example, the last char of "hello" is "o". Return the last character of the following string: "and"

Question 3 (Question id: q_hWhan):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 3 fireflys, 3 sheeps, 1 jellyfish?
 Respond with an integer.

Question 4 (Question id: q_hb6UBW7S):
Your job is to return the last character of a string as a string. For example, the last char of "hello" is "o". Return the last character of the following string: "can"



Your output must be a JSON mapping every question id to its answer info.

For every question id, supply an object whose 'answer' field stores the solution.
If the response to a question is an integer that is even, also add the field 'half_answer' to the object which contains the answer integer divided by two.
For string answers, include 'first_char' with the answer’s initial letter.
If the question asks for the last character of a string, add an 'original_string' field containing the source string.

Now provide the result JSON using the described format.

{"ground_truth": {"q_yGIS": {"answer": 50, "half_answer": 25}, "q_d4qyZxbe": {"answer": 18, "half_answer": 9}, "q_X9sy": {"answer": "d", "first_char": "d", "original_string": "and"}, "q_hWhan": {"answer": 30, "half_answer": 15}, "q_hb6UBW7S": {"answer": "n", "first_char": "n", "original_string": "can"}}}