You will be given a definition of a task first, then some input of the task.
The task is to generate the correct answer for a given math problem.

Problem: john has 10 pairs of matched socks . if he loses 3 individual socks , what is the greatest number of pairs of matched socks he can have left ?
Output:
8