user
Task: Generate a function that satisfies the given constrains.

The function should return 0 for all inputs greater than 4 and for values that are not divisible by 3, it should return the next greatest multiple of 3.


assistant
f(x) = 3*ceil(x/3) if x <=4 else 0