Comparison of the number of cards of black and red suit

Take from the deck 10 cards: 5 cards of a black suit and 5 cards of a red suit. Cards of one color of one of the suits turn over and give all 10 cards to the viewer for shuffling. After the spectator has shuffled the cards, you take them in hand and clean them behind your back. Then you again lay out cards on 5 pieces a shirt downwards. The sum of the open cards in each five will be equal, and the cards will be of different colors. For example, if 3 red cards are in one five, then in the other five of cards, 3 black cards will be opened. The secret of the focus is that among the cards of one five there will be the same number of cards as in the other five. Just behind you, you divide a pack of cards into equal parts and before you show the audience, turn one of the halves. Due to the fact that the cards are inverted, the number of open cards in each five is equal and they will be of a different color. In this focus, you can use any even number of cards, you only need one half of the cards to be red and the other half of the cards to be black.