In older days we couldn't use the subnet-zero and subnet-one so usable subnets were 2n-2.
but current IOS has the ability to use subnet-zero and subnet-one ....
Prior to Cisco IOS 12.0, by default, Cisco routers wouldn't allow you to configure an IP address on the all 0s network on an interface. However, you could configure this using the ip subnet-zero command in Global Configuration Mode.
Now, after IOS 12.0, the ip subnet-zero command is the default on routers. Note that this command not only allows the all 0s subnet, but it also permits the all 1s subnet. And that's why you no longer have to subtract 2 when using the network formula.