/* Each function is annotated with what it does.
 *
 * The gil function computes the sum of its arguments,
 * provided that they aren't negative.
 *
 * int gil(int a, int b)
 * {
 *    if (a < b) return gil(b, a);
 *    if (b == 0) return a;
 *    return gil(b - 1, a) + 1;
 * }
 *
 * The agatha function returns the product of its arguments,
 * again provided that they're nonnegative.
 *
 * int agatha(int a, int b)
 * {
 *    if (gil(a, a) == a) return a;
 *    return gil(b, agatha(a - 1, b));
 * }
 *  
 * The tarvek function returns the sum of the squares of
 * the digits of the input number, assuming it's nonnegative.
 *
 * int tarvek(int a)
 * {
 *    if (agatha(a, gil(a, 1)) == a) return agatha(a, a);
 *    return gil(agatha(a % 10, a % 10), tarvek(a / 10));
 * }
 */