Rosetta Problems

Is Either 1?

https://atcoder.jp/contests/pakencamp-2023-day2/tasks/pakencamp_2023_day2_e