CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #920 #922 →

#921. Grid paths with walls

You get a grid with `.` (free) and `#` (wall) cells. How many paths go from the top-left to the bottom-right if you can only move right or down? ### Input n m, then n lines. ### Output A number.

Examples

Input
2 2
.#
..
Output
1
Input
4 3
...
...
.#.
...
Output
4

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!