import java.util.*; class y436 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int c = s.indexOf('w'), w = s.length()-c; c--; System.out.println(c