public static int degree( String f )
    {
        if( ! f.contains( "+" ) )
        {
            return ANFParser.count( f, 'x' );
        }
        String[] st = f.split( " \\+ " );
        int x = 0;
        int y = 0;
        for( String s : st )
        {
            y = ANFParser.count( s, 'x' );
            if( y > x )
            {
                x = y;
            }
        }
        return x;
    }