 while n = gets.chomp.to_i do
	count = 0
	if n > 36 then puts 0 else
		if n > 18 then n = 36-n else
			[9,n].min.downto(0) do |a|
				if a <= n then
					# puts "n:#{n-a}, a:#{a}"
					[a,n-a].min.downto(0) do |b|
						if b <= n then
							# puts "n:#{n-a-b}, a:#{a}, b:#{b}"
							[b,n-a-b].min.downto(0) do |c|
								if c <= n then
									# puts "n:#{n-a-b-c}, a:#{a}, b:#{b}, c:#{c}"
									[c,n-a-b-c].min.downto(0) do |d|
										if d == n-a-b-c then
											puts "a:#{a}, b:#{b}, c:#{c}, d:#{d}"
											if a == b and b == c and c == d then
												count += 1
											elsif (a == b and b == c) or (b == c and c == d) then
												count += 4
											elsif a == b and c == d then
												count += 6
											elsif a == b or b == c or c == d then
												count += 12
											else
												count += 24
											end
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
	p count
end