If the number of dogs in the neighborhood was originally half the number of cats in the neighborhood before twenty new dogs were born, and now there are twice as many dogs as cats, how many cats were in the neighborhood, to begin with, if there are 20 cats now?
Now there are twice as many dogs as cats, and if the number of cats is 20, there are 2*20=<<2*20=40>>40 dogs.
Before twenty new ones were born, the number of dogs in the neighborhood originally was 40-20=<<40-20=20>>20
If the number of dogs in the neighborhood was originally half the number of cats in the neighborhood, there were 20*2=<<20*2=40>>40 cats in the neighborhood.
#### 40
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
You are solving math problems. Here are some examples of how to solve the task:

Betty has a tray of cookies and a tray of brownies.  She has a real sweet tooth and eats 3 cookies a day and 1 brownie a day.  If she starts with 60 cookies and 10 brownies, how many more cookies than brownies does she have after a week of eating like this?First we find how many cookies Betty will eat in a week by multiplying her daily amount by 7, meaning 7*3=<<21=21>>21 cookies eaten in a week.
We repeat this for the brownies, finding she eats 7*1=<<7*1=7>>7 brownies in a week.
We subtract the 21 cookies from the original amount of 60, finding 60-21= <<60-21=39>>39 cookies remaining.
We repeat this step for the brownies, finding 10-7= <<10-7=3>>3 brownies remaining.
In the end, therefore, Betty has 39-3= <<39-3=36>>36 more cookies than brownies.
#### 36[END]

There are 9 boys and 12 girls in a class. The teacher needs to create groups with three members for their class activity. How many groups are formed?There are 9 + 12 = <<9+12=21>>21 students in a class.
Hence, 21/3 = <<21/3=7>>7 groups are formed.
#### 7[END]

Now, solve this next question in the style of the above examples:

If the number of dogs in the neighborhood was originally half the number of cats in the neighborhood before twenty new dogs were born, and now there are twice as many dogs as cats, how many cats were in the neighborhood, to begin with, if there are 20 cats now?

### Response:
Now there are twice as many dogs as cats, and if the number of cats is 20, there are 2*20=<<2*20=40>>40 dogs.
Before twenty new ones were born, the number of dogs in the neighborhood originally was 40-20=<<40-20=20>>20
If the number of dogs in the neighborhood was originally half the number of cats in the neighborhood, there were 20*2=<<20*2=40>>40 cats in the neighborhood.
#### 40