Edit in JSFiddle

$width1: 20px;
$width2: 10px;

@function containerwidth($n) {
   @return $n * $width1 + ($n - 1) * $width2;
}
.container { 
  width: containerwidth(20); 
  border:solid 1px #000;
  text-align:center;
  text-align:center;
  background-color:yellow;
  padding:20px;
}
<div class="container">
This is SCSS Function
</div>