i = 1
odd_num = 0
even_num = 0
gets.chomp.each_char do |s| 
  if i.odd?
    if s == "R" or s == "U" or s == "D"
      odd_num = 1
    else
      odd_num = 0
    end
  end

  if i.even?
    if s == "L" or s == "U" or s == "D" 
      even_num = 1
    else
      even_num = 0
    end
  end
  i += 1
end