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_iYNLbNlh):
Calculate 8 + 7 + 8.

Question 1 (Question id: q_aXGH):
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 cow, 1 ant, 4 scorpions, 2 grasshoppers?
 Respond with an integer.

Question 2 (Question id: q_6SSQF):
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 4 fireflys, 2 beetles, 4 ducks?
 Respond with an integer.

Question 3 (Question id: q_CeYl):
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"



Produce a JSON object whose top-level keys are the question ids.

The value for each key should be an object that contains the answer in the field 'answer'.
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.

Add a top-level 'global_metadata' field that records overall stats:
'num_questions_asked' should equal the total questions that appeared.

Now provide the result JSON using the described format.

{"ground_truth": {"q_iYNLbNlh": {"answer": 23}, "q_aXGH": {"answer": 54, "half_answer": 27}, "q_6SSQF": {"answer": 44, "half_answer": 22}, "q_CeYl": {"answer": "d"}, "global_metadata": {"num_questions_asked": 4}}}