def calculate_transaction_size(n_of_txin, n_of_txout):
    """Transaction size in bytes based on inputs and outputs for non segwit addresses
    """

    return (n_of_txin * 180) + (n_of_txout * 34) + 10 + n_of_txin